-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
No wwwroot created on publish of an ASP.NET with React Project #60652
Comments
same problem here, changing project sdk to latest nuget version (microsoft.visualstudio.javascript.sdk/1.0.2518757) makes no effect. edit: last working version for me is |
@xensik How did you pin that version? I couldn't figure out where this version is of |
Same issue. Is there a workaround? |
change the sdk version in the project file to the last working version ![]() |
Same issue happened to me. And it fixed it. |
Same issue here. When you create a new React project in Visual Studio 2022, you have to change the Microsoft.VisualStudio.JavaScript.SDK version to 1.0.2125207 to have the wwwroot folder being published. |
I have the same problem with an Angular project. I could also fix it by reverting to SDK version 1.0.1738743. (This is a version that a previous VS version set as default for new projects.) I've also found the same bug report here: https://developercommunity.visualstudio.com/t/MicrosoftVisualStudioJavaScriptSdk-no/10860121 @joj I'd like to repeat something another user posted there:
Related: #56111 |
+1 have the same issue.
This fixed it nicely. |
According to my issue on Developer Community (https://developercommunity.visualstudio.com/t/MicrosoftVisualStudioJavaScriptSdk-no/10860121):
I will provide more information as I get it. |
Since this issue is being tracked as a Visual Studio Feedback ticket and relates to a product other than ASP.NET Core, we're going to close this out. A fix has been merged and will be included in an upcoming Visual Studio release. |
Confirmed fixed in 1.0.2655793. |
Is there an existing issue for this?
Describe the bug
When using the template ASP.NET with React Project in the past when i built and published the Solution a got binaries that contained a wwwroot folder that conatined the output of the vite build (dist folder). This does not happen anymore - I digged deep into the build logs to compare both solutions and found two interesting things:
1.
On the new Project
microsoft.visualstudio.javascript.sdk\1.0.2191419\Sdk\Sdk.targets
is used on the oldmicrosoft.visualstudio.javascript.sdk\0.5.271090-alpha\Sdk\Targets\Sdk.WebAssets.targets
. They have vastly different outputs so i can't realy compare the operations associated with it. I also don't know where the pin of this version comes from - the Projects are completey the same judging by the sln csproj launschsettings an property fiels in it.2 .
I realized in the new build output there is a function called
_PublishCopyStaticWebAssetsPreserveNewest
beeing skipped - which is NOT skipped in the old version.New Project build:
Old Project build
Does anyone have an idea what is going on? I assume there must be a bug in either the template or some under the hood dependencies that are used during an
dotnet publish
I am really desperate and can't find a solutionExpected Behavior
www root folder beeing in the published output so taht when the published output is started it serves the frontend
Steps To Reproduce
Create new project from VS teamplate "React and ASP.NET Core" (TypeScript)
Make a Folder Publish
Inspect the publish folder:
See no wwwroot folder is present.
-> If you start the .exe in that publish folder it also comes up with a warning that it did not find the wwwroot:
Exceptions (if any)
No response
.NET Version
9.0.200
Anything else?
VS
The text was updated successfully, but these errors were encountered: