-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
.NET Core 2.0 Preview 2 #711
Comments
All work fine
All return Unknown option even though help indicates
|
@livarcocc , can you take a look? |
Since trying the preview2 building my project I get:
I am referencing some .net 4.5 project and nugets, which has worked on preview 1, but now there is some asset fallback. How do I make this work again? |
@rrelyea Can you give guidance on PTF and ATF? |
@Petermarcu ah I removed all in my project and it started to work again. |
@JeffreyMcBride , I have opened an issue in dotnet/cli to track your issue and mentioned you in it. Thanks. |
@danwalmsley - More details...PackageTargetFallback worked like imports did in Project.json. |
Not sure if this is the right place since this looks more like a VS issue but the following doesn't work after preview 2:
Building the project results in a bunch of package downgrade errors: The work around is to manually edit the project file and change the dependencies as follows: The work around is to manually change the versions in the project file as follows
|
Yeah, migration from asp.net core 1.X to 2.0 isn't as simple as just changing the target framework. @DamianEdwards are there any docs that tell people what to do. This issue may be better on the aspnet/home repo. |
The migration docs for ASP.NET Core are in progress and will be done by the time we ship 2.0.0 RTW. |
Running a self-contained netcoreapp2.0 preview 2 on arm (RPI2) gives me this exception now matter what I do or what references I try to update. |
@WillooWisp , can you share your project? Are you referencing WCF? The trick will be figuring out which assembly you are pulling in that has that references to that assembly. |
after I have upgraded from preview1 |
I also have one Windows 10 machine where "dotnet restore" hangs indefinitely with the latest preview installed. It works on my other Windows 10 machine. I have no idea why it hangs - it seems a network request is just timing out indefinitely. No proxy involved. I tried resetting my firewall settings but that didn't seem to help. |
@rrelyea for the dotnet restore issue. |
@Petermarcu I cannot share the project, but I can try to reproduce it, my guess is that it might be due to referencing the Microsoft.AspNet.WebApi.Client 5.2.3, but I have tried the Microsoft.AspNet.WebApi.Client 5.2.4-alpha1-170629 as well without any difference. It is only a problem on arm, not on windows. |
@Petermarcu No that was a wrong guess from my side, removed the WebApi.Client dependency and commented out all code related to that. Still get: Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. |
I moved the |
@Petermarcu I finally nailed it down to this line of code, throw new CommunicationException. When referencing CommunicationException in the code I get the "Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'" when running the console app, otherwise not. |
https://github.com/dotnet/cli/issues/6286 (which is ultimately caused by NuGet/Home#4424 according to the comments in that thread) appears to not be fixed yet in preview2: I was able to reproduce that bug in TheAngryByrd/MiniScaffold#19. See NuGet/Home#4424 (comment) for specific version details of when that NuGet bug was fixed (in a commit that does not appear to have been included into dotnet preview2). |
@livarcocc the comment by @rmunn seems like something we should get into preview3 ASAP. Yes? |
@mlorbetske I wonder if this is actually an issue in dotnet new. Since it happens during dotnet new when instantiating the template. Mike, can you take a look? |
@livarcocc reading through the comments, there seems to be a variety of things being discussed - which thing is happening while instantiating templates? |
@mlorbetske I assume @livarcocc is referriung to #711 (comment). Same as https://github.com/dotnet/cli/issues/6286. |
@livarcocc created dotnet/templating#1028 for the dotnet new file permissions issue |
That is a good place to report. If its clear which layer of the stack the problem is in, filing it in the matching repo can also work but it requires more knowledge of how the product is built. Reporting more details here can also work and we can help route. |
@Petermarcu Thanks. Quick version, I can provide more detail if appropriate. VS2017 appears not to use dotnet publish for its publishing process. When I publish a web app using a win10-x64 RID SCD profile with VS2017 15.3 P7, no EXE is produced to start Kestrel in lieu of dotnet run. But dotnet publish --runtime win10-x64 does produce .exe, and it can start the app fine. |
@barrytang @livarcocc can you help look into issues with Publish from VS? |
@Petermarcu FYI, I ran a class last week using ASP.NET Core 2 preview 2. Almost everything was fine!
Not bad for preview version... |
I believe the publish issue is a .NET Core CLI issue. @livarcocc is currently on vacation. @nguerrera, are you right guy to take a look on Livar's absence? Adding @MattGertz as well. @prafullbhosale, can you take a look at the Scaffolding issue above? Adding @mlorbetske as well. |
@barrytang Happy to help however I can. The description of the publish issue mentions things working on the command line but not with VS: #711 (comment). Is there a way to get the msbuild invocation that VS uses when publishing? I would like to understand how it might be different from the dotnet publish command that is working. |
This should no longer be happening as the 2.0.0 version of the package is available on NuGet.org. |
@JeffreyMcBride I just tried publishing a netcoreapp2.0 (empty web app) with win10-x64 rid from VS & it created an exe in the publish output folder. This is the sample project that I tried- https://github.com/vijayrkn-test/netcoreapp20_win10_x64/blob/master/WebApplication1/WebApplication1.csproj Would it be possible to provide a sample project where publish from VS is not working correctly? I would be happy to take a look. |
visual studio freeze ~15 seconds when:
project size: 900 cs file / 200k LOC dotnet --info:
visual studio version:
|
@vijayrkn Please find a solution with 3 projects, an Empty Web App, Web API, and Web App (MVC) at this location: These are unmodified project templates created using VS2017 15.3 Preview 7. I left the bin, obj, and wwwroot/lib folders as is so its a bit big. But wanted you to see the output from the publish I did on each of the 3 projects. No .EXE created on any of the 3. This is not the solution I originally noticed the issue, and I can push that as well but since these were clean I thought they would be more useful. Please note the other solution has multiple projects in it as well, MVC, Web API, and Class Library (Core), not sure if that is related. Jeff |
@JeffreyMcBride Can you please add this to all the publish profiles?
Alternatively, if you are planning to have only 1 RID, then you can update the 'RuntimeIdentifiers' to 'RuntimeIdentifier' in the csproj and that should also work. |
@vijayrkn Interesting results. Before I changed anything, I checked the Publish Profile Dialog Box | Settings options, and it showed that the profile was set to use win10-x64 as the RID, even though as you pointed out, there is no Then I tried changing the CSPROJ to use Then I changed the CSPROJ to use I then changed Publish Profile Dialog | Settings to use the osx.10.11-x64 RID, but did not actually publish since .EXE wouldn't necessarily be produced for this RID, and I verified that the PUBXML now had So the issue seems to be with CSPROJ |
This is the expected behavior. We don't write the RuntimeIndentifer to the pubxml if it is already present in the csproj. The pubxml automatically gets all the properties from the csproj since pubxml is an msbuild file. From the description of the issue, It looks like there is still an issue here with the publish settings RID dropdown that it is not writing the RID to the pubxml unless a value is changed in the dropdown. We will investigate this issue. As a work-around , you can add the RID to the pubxml and publish from VS should work as expected. Thanks for reporting this issue. |
@vijayrkn Thanks for taking the time to troubleshoot it with me and giving me some more insight into the inner workings of VS Publish. Question if I may? Is VS using |
VS does not call 'dotnet publish' directly, but uses the same set of targets that 'dotnet publish' uses. VS publish and dotnet publish should behave the same when the same set of parameters are passed to it. In this case, a specific runtime property was passed to 'dotnet publish' from commandline but from VS this property was not passed
Both are fine. You can pass the properties directly to 'dotnet publish' or you can pass a profile to 'dotnet publish'. Passing the profile to dotnet publish is only supported for web projects. for e.g: if you want to publish your web app to azure from commandline, then you can use
You can find samples of profiles here https://github.com/aspnet/websdk#microsoftnetsdkpublish. The above command will look for a profile named 'AzureProfile.pubxml' in Properties\PublishProfiles\ |
@JeffreyMcBride thanks for providing the feedback. I was off the grid for the past couple of weeks and didn't get a chance to respond. Looks like your first issue is now understood. @barrytang and @Eilon who is the best person to take a look at the other two issues? Should we get them filed in a difference repo to make them easier to track?
|
Using latest .NetCore:
Code compiles, but when I try to run it throws an error:
I want to implement/use Log4Net logger (v2.0.8). |
@Drasius2 That error is from nuget restore, which happens before compilation, not after it. It is saying that there are indirect references to both v4.0.0 and v4.3.0 of System.Net.NameResolution, and the lower v4.0.0 was chosen because it is "nearer" to your project. Similarly for v4.0.11 and v4.1.0 of System.Net.Primitives. In previous versions of the .NET Core SDK, this would have been treated as a warning, but in 2.0 it is an error by default. You can get back to the v1 warning only behavior by removing NU1605 from the warnings treated as error in the project property pages. But instead of doing that, we should get to the root cause and fix it. This case is a little odd with the runtime.* 4.3.0 packages getting pulled in somehow without their non runtime.* companions. Can you share AlertManager.csproj so that I can see how that is happening and help you determine the best fix? |
@prafullbhosale , can you take a look? |
I did comment about this earlier : #711 (comment) Are you still seeing this issue? |
@muratg - who can look at the logging BeginScopes issue mentioned at #711 (comment) ? |
@pakrym, could you take a look at that issue and file a bug for tracking it further? |
@muratg I suspect |
I think this issue has run it's course. We've shipped RTM. Any new issues that come up should be opened in the appropriate repo and be focused on that issue. |
.NET Core 2.0.0 Preview 2 is available.
You can read about .NET Core 2.0.0 Preview 2 in the release notes and .NET blog announcement.
Please report any issues you find with .NET Core 2.0.0 Preview 2 here, either responding to this issue or creating a new issue.
Please note that this repo (dotnet/core) is not for filing product issues. Here are some repos where you can file an issue:
The text was updated successfully, but these errors were encountered: