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

Error: Cannot write embedded resource from assembly 'Blazor.Extensions.SignalR.JS' #1769

Closed
Apollo3zehn opened this Issue Dec 17, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@Apollo3zehn
Copy link

Apollo3zehn commented Dec 17, 2018

Edit: Sorry, I noticed too late that also the issues should be created in the new repo. I will create a new one here.

Hi,

I am just setting up a project with ASP.NET as server and Blazor as client. I also use a Directory.Build.props file to redirect bin and obj folders into artifacts folder. This redirection causes the following error:

Cannot write embedded resource from assembly 'Blazor.Extensions.SignalR.JS' to
C:\Users\wilvin\Desktop\IBOW\artifacts\obj\xx\Debug\netstandard2.0\blazor_content\Blazor.Extensions.SignalR.JS because it is outside the expected directory
C:\Users\wilvin\Desktop\IBOW\build..\artifacts\obj\xx\Debug\netstandard2.0\blazor

The difference is: IBOW\build\..\artifacts vs IBOW\artifacts, which is the same path. If I normalize the path with msbuild first, there is no problem. Example:

<ArtifactsPath>[MSBuild]::NormalizePath($(MSBuildThisFileDirectory)../artifacts)</ArtifactsPath>

<BaseIntermediateOutputPath>$(ArtifactsPath)/obj/$(MSBuildProjectName)</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)/$(Configuration)</IntermediateOutputPath>
<OutputPath>$(ArtifactsPath)/bin/$(MSBuildProjectName)/$(Configuration)</OutputPath>

I think the best way to solve it in general is if this code block is normalizing the paths before comparison, so that no msbuild normalization is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment