-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to use dotnet sln add
to add an esproj to a solution
#36617
Comments
Similar issues for other project types |
@KalleOlaviNiemitalo is correct - we have to add explicit support for different project types. This is (I believe) due to the need to know the project type guid to insert into the solution file. If @joj wants to send a quick PR we'd be happy to take it, or we can see if we can squeeze this in the next iteration. |
I wonder if a |
I believe the original intent of the constrained set of explicitly supported projects was to prevent adding projects that the . NET SDK itself couldn't build. As more kinds of projects support modern .NET we may need to rethink this assumption. |
I imagine the new option would work like this:
with a table in docs:
(Version numbers from dotnet/cli#5022 merge dotnet/cli@441277c, dotnet/fsharp#2993 merge dotnet/fsharp@9c75634, and #33837 merge ed87865.) Do |
On second thought, drop the |
Two things need to happen:
Then |
slngen has a different scheme, using |
Logged #36638 to document this implicit requirement of the SDK (along with hopefully many others). |
any news on this issue? |
dcproj is a separate thing from esproj - the docker compose project type doens't support building with new-style SDKs, and so the .NET CLI isn't able to interact with it. The only reason esproj works is because the team that owns esproj did the work to make their project type work with the .NET SDK. I would suggest that you log a feedback ticket in Developer Community for the Visual Studio Container Tools for Docker team to request that they support the .NET SDK. Once that work is done, the .NET CLI should work pretty much automatically. |
After trials and error I managed to make my script work. In my scenario my script is generating a solution using CLI and copying some files, I managed to use
in my dcproj I'm adding and it's working |
Visual Studio has an esproj project type for working with JavaScript in a .NET solution. If I try to use the .NET SDK to add an esproj to a solution I get the following error:
PS C:\Users\user\Documents\RazorClassLibraryWithEsProjTemplate\bin\samples> dotnet sln add .\RclESBuild\RclESBuild.Assets
Project 'C:\Users\user\Documents\RazorClassLibraryWithEsProjTemplate\bin\samples\RclESBuild\RclESBuild.Assets\RclESBuild.Assets.esproj' has an unknown project type and cannot be added to the solution file. Contact your SDK provider for support.
.NET SDK version 8.0.100
@baronfel @joj
The text was updated successfully, but these errors were encountered: