Slngen target for new style SDK does not work
See original GitHub issueRunning msbuild /t:SlnGen on a new style SDK csproj file does not work. Prompts with error:
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 29/05/2018 2:33:03 PM.
Project "C:\Dev\Fx\Main_git\Product\Source\Containers\Container\Container.csproj" on node 1 (SlnGen target(s)).
C:\Dev\Fx\Main_git\Product\Source\Containers\Container\Container.csproj : error MSB4057: The target "SlnGen" does not exist in the project.
Done Building Project "C:\Dev\Fx\Main_git\Product\Source\Containers\Container\Container.csproj" (SlnGen target(s)) -- FAILED.
Build FAILED.
"C:\Dev\Fx\Main_git\Product\Source\Containers\Container\Container.csproj" (SlnGen target) (1) ->
C:\Dev\Fx\Main_git\Product\Source\Containers\Container\Container.csproj : error MSB4057: The target "SlnGen" does not exist in the project.
0 Warning(s)
1 Error(s)
Issue Analytics
- State:
- Created 5 years ago
- Comments:14
Top Results From Across the Web
Frequently Asked Questions | slngen - Microsoft Open Source
Why is Visual Studio not working with my generated solution files? SlnGen does ... Newer SDK-style projects use the Configurations and Platforms properties:....
Read more >How to use msbuild to generate a VS .sln file where ...
sln file for the project by running msbuild /t:SlnGen /p:Platform=x64 at the command prompt, and then click build in VS (debug, x64), I...
Read more >Multi-targeted csproj referencing a vcxproj causes freeze ...
Our multi-targeted SDK-style csproj referencing a vcxproj causes freeze on solution load (solution created w/ slngen). Visual Studiowindows 10.0visual ...
Read more >Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >Setting up a .NET Project in 2021 - Ethan Shea
The project in this post will target .NET 5, C#9.0 and use the .NET 5 SDK. The repository is available on GitHub here....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
SlnGen
target comes from a NuGet package. Did you restore packages first?msbuild.exe /restore /t:SlnGen
If so, is your code base entirely using
PackageReference
and did you add<PackageReference Include="SlnGen" />
a common import likeDirectory.Build.props
?Closing this for now, please re-open if you’re still blocked