You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use dotnet build I'll pass the SourceFile and Framework values so it gets properly populated. (This gets used in a GitHub actions matrix to test across multiple versions of .NET.)
But whenever I load the project in VS Code, it complains: Error while loading [path]: The "ResolvePackageAssets" task was not given a value for the required parameter "TargetFramework". Very understandable!
However: this error keeps popping up even if I say "Turn off Info and Warning Notifications from 'C#'" (maybe that's a VS Code bug?). I don't want to disable C# support entirely because I still want to make use of it elsewhere in the project. It's just this stray template file causing the annoyance. If I rename it to end with, say, .csproj.template and pass it directly to dotnet build, it seems to want a more complete file (complaining about CreateManifestResourceNames missing, for example).
Is there a way to just silence this warning, which is meaningless in this context, so that I don't have to see it every time I start the project? (This is a polyglot monorepo, so I'm not even using C# most of the time I work in it!)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I recognize this is kind of niche, but wondering if anyone had a thought.
I have a small
.csproj
template that I use to test single-file scripts. It looks like this:When I use
dotnet build
I'll pass theSourceFile
andFramework
values so it gets properly populated. (This gets used in a GitHub actions matrix to test across multiple versions of .NET.)But whenever I load the project in VS Code, it complains:
Error while loading [path]: The "ResolvePackageAssets" task was not given a value for the required parameter "TargetFramework".
Very understandable!However: this error keeps popping up even if I say "Turn off Info and Warning Notifications from 'C#'" (maybe that's a VS Code bug?). I don't want to disable C# support entirely because I still want to make use of it elsewhere in the project. It's just this stray template file causing the annoyance. If I rename it to end with, say,
.csproj.template
and pass it directly todotnet build
, it seems to want a more complete file (complaining aboutCreateManifestResourceNames
missing, for example).Is there a way to just silence this warning, which is meaningless in this context, so that I don't have to see it every time I start the project? (This is a polyglot monorepo, so I'm not even using C# most of the time I work in it!)
Beta Was this translation helpful? Give feedback.
All reactions