Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide CommandLineArgsForDesignTimeEvaluation? #47

Closed
chucker opened this issue Jan 19, 2023 · 4 comments
Closed

Provide CommandLineArgsForDesignTimeEvaluation? #47

chucker opened this issue Jan 19, 2023 · 4 comments

Comments

@chucker
Copy link

chucker commented Jan 19, 2023

It seems this is an MSBuild property to speed up design-time evaluation.

And it seems this is now mandatory in Version 17.5.0 Preview 3.0. I get the following exception, and the project fails to fully initialize:

=====================
1/19/2023 11:44:21 AM
LimitedFunctionality
Microsoft.VisualStudio.LanguageServices.ProjectSystem.InvalidProjectDataException: Property 'CommandLineArgsForDesignTimeEvaluation' is required.
   at Microsoft.VisualStudio.LanguageServices.ProjectSystem.EvaluationData.GetRequiredPropertyValue(String name)
   at Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem.CPS.CPSProjectFactory.<CreateProjectContextAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ProjectSystem.LanguageServices.Workspace.<>c__DisplayClass39_0.<<OnEvaluationUpdateAsync>g__ProcessInitialEvaluationDataAsync|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__Action|0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )

I'm not sure if this is a bug on MS's end, given that it's a preview, but maybe we should set this property regardless.

@leusbj
Copy link
Contributor

leusbj commented Jan 19, 2023

I think you might be onto something regarding a "Preview Issue", and is potentially something already under review

One of the linked commits looks as if that property is being adjusted to nolonger be retrieved with a "GetRequiredPropertyValue" to instead use the "GetPropertyValue", so it might resolve itself in the next couple of preview releases

@rahulvermapropertyme
Copy link

This is now a problem in the latest GA release (v17.5)

@CZEMacLeod
Copy link
Owner

Looks like they never fixed 17.5. Either switch your install to 17.4.4 LTSC or use the 17.6.0P1.0 Preview editions...

dotnet/roslyn#66367 (comment)

@chucker
Copy link
Author

chucker commented Feb 23, 2023

(See also #52)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants