aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Unable to build source code

Open babula38 opened this issue 8 years ago • 19 comments

Steps to reproduce:-

  1. clone the repo.
  2. Vs2017 preview 3 is installed.
  3. execute the build.cmd.
  4. open the solution in Visual studio.
  5. try to build. tried multiple time to clone the repo and build but no luck. The last thing is pending Reinstall, vs2017 preview again and try.

github

babula38 avatar Apr 11 '18 18:04 babula38

What's the output from build.cmd? Was it successful?

I just performed a clean build and it builds successfully for me without errors in Visual Studio.

talha-sayed avatar Apr 11 '18 19:04 talha-sayed

Never mind. I was on an older commit. I got the latest and I am facing the same issue as you now.

talha-sayed avatar Apr 11 '18 19:04 talha-sayed

If those errors are coming from the template projects you safely just unload those. (right click -> unload)

image

@SteveSandersonMS do you have a fix in mind for this? Options I can think of:

  • Add the Blazor feed to the top level nuget.config
  • Remove the projects from the solution since they aren't supposed to build anyway - the content would still be part of the solution since it's include by the template project

rynowak avatar Apr 11 '18 19:04 rynowak

could you past the blazor feed and how to configure that?

  • Tried with both dev and release 0.2 branch

  • Just unload the projects inside the template folder. Now i am down to 2 errors.

after unload

  • The feed currently configured is below. feed

  • Another thing i noticed the project MonoSanityClient load is failed. monoclient unload

babula38 avatar Apr 12 '18 07:04 babula38

@babula38 I just wanted to create the same issue, but then I saw you have the same problems as I :-) How did you fix the first error in your top screenshot, about the unable to find package microsoft.aspnetcore.blazor.cli ? Thats the last error I have...and yes the MonoSanityClient also fails to compile/load here too.

@rynowak The template projects are building fine here!

bastienJS avatar Apr 12 '18 16:04 bastienJS

Building the Blazor repo will require that the copy of dotnet installed by the repo is on your path.

Visual Studio using the PATH environment variable to determine which dotnet to use, and then uses dotnet to determine which SDK to use. If you're getting issues loading a project can you please right click and try Reload Project? This should hopefully produce some kind of error message or output in the output window.

rynowak avatar Apr 12 '18 18:04 rynowak

This will be resolved by aspnet/Blazor#559

SteveSandersonMS avatar Apr 13 '18 12:04 SteveSandersonMS

I guess this issues still be opened:- @bastienJS I have removed the template, E2E test,MonoSanity,Mono and BasicTestApp projects from the solution to make it compile. @rynowak below is the error i am getting when trying to reload the MonoSanity client. load error

babula38 avatar Apr 14 '18 10:04 babula38

@babula38 what version of dotnet is on your path?

What does dotnet --list-sdks print?

rynowak avatar Apr 16 '18 04:04 rynowak

@rynowak I hope its ok that I post the versions of donet on my path because I get the same error as @babula38

image

bastienJS avatar Apr 16 '18 19:04 bastienJS

@bastienJS You need to have 2.1.300-preview2-008533, which should be downloaded and used automatically if you run build.cmd from the solution root. Then you need to launch VS from the command prompt that has 2.1.300-preview2-008533, not just from your taskbar or similar.

SteveSandersonMS avatar Apr 16 '18 19:04 SteveSandersonMS

I'm planning to update the repo instructions with the setup that most ASP.NET Core team members ues.

rynowak avatar Apr 16 '18 19:04 rynowak

I am using the following and seems to work. Are these combinations legit?

 <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.0-preview2-final" PrivateAssets="all" />
    <PackageReference Include="Microsoft.AspNetCore.Blazor.Browser" Version="0.3.0-preview1-10220" />
    <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.3.0-preview1-10220" />
    <PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
    <DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.3.0-preview1-10220" />
  </ItemGroup>

dlr1 avatar Apr 16 '18 19:04 dlr1

I've update the documentation regarding building the repo. https://github.com/aspnet/Blazor/blob/dev/README.md#building-the-repo

And using CI builds https://github.com/aspnet/Blazor/blob/dev/README.md#using-ci-builds-of-blazor

Please check those out and let us know if there's anything else we need to do to help

rynowak avatar Apr 16 '18 20:04 rynowak

I am using the following and seems tow work. Are these combinations legit?

Looks good to me.

rynowak avatar Apr 16 '18 20:04 rynowak

@rynowak Just tested your updated https://github.com/aspnet/Blazor/blob/dev/README.md#building-the-repo

and doing

build.cmd /t:Restore

I get this error with the latest version from today:

image

Reading the error about the switch statement does not help me. Why should I switch BlazorExtension.csproj ?

bastienJS avatar Apr 16 '18 20:04 bastienJS

can you post the content of artifacts\logs\vsix-restore.rsp ?

Something is generating the wrong command

rynowak avatar Apr 16 '18 21:04 rynowak

My guess is that something isn't quoted correctly

rynowak avatar Apr 16 '18 21:04 rynowak

@bastienJS - I pushed a change to dev that I think should solve your issue. let me know if this helps.

rynowak avatar Apr 16 '18 22:04 rynowak