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

Unable to publish server-hosted Blazor app from Visual Studio Preview #11088

Closed
NeilMacMullen opened this issue Jun 11, 2019 · 4 comments
Closed
Labels
area-blazor Includes: Blazor, Razor Components investigate
Milestone

Comments

@NeilMacMullen
Copy link

NeilMacMullen commented Jun 11, 2019

This may be related to #10878 but appears to have different symptoms.

The issue is described at https://stackoverflow.com/questions/56543379/how-can-i-deploy-a-blazor-server-hosted-application-from-visual-studio-2019 but in summary, when attempting to publish a server-hosted Blazor app from with Visual Studio, it appears that the deployment process assumes that the Client dll lives in $client-build-directory/$runtimeEnvironment rather than just $client-build-directory. I.e. I get errors saying

CSC(0,0): Error CS0006: Metadata file 'D:\work\Applications\Web\MyApp.Client\bin\Release\netstandard2.0\win-x86\MyApp.Client.dll'
could not be found

Note that the dll has been built to D:\work\Applications\Web\MyApp.Client\bin\Release\netstandard2.0\MyApp.Client.dll

@NeilMacMullen
Copy link
Author

I have just spotted that the reported error in the Error List is the same as for #10878. Not sure if that means it's really the same problem or it's just that any build error will eventually cause a "projects.assets.json" report.

@NeilMacMullen
Copy link
Author

Further details in the SO link above, but it appear my main problem was trying to set the deployment to "self-contained" to workaround the lack of .netcore 3.0 on the server. It appears that .netcore3 can be manually added from the Azure portal (websockets also needs to be enabled) but this is not done automatically by the deployment mechanism.

@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @NeilMacMullen.
Looks like you've got your problem solved already. We're closing this issue as there is no follow-up actions are pending here.

@NeilMacMullen
Copy link
Author

@mkArtakMSFT The implicit follow-up action in my last comment was for the deployment mechanism to be modified to add .netcore 3 automatically or, at the very least, for a warning to be generated making it obvious that this needs to be done. (Maybe this has already been done/worked around in one of the referenced issues?)

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components investigate
Projects
None yet
Development

No branches or pull requests

5 participants