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

.NET 6 preview.3 #78

Closed
petervandenhout opened this issue Apr 21, 2021 · 4 comments · Fixed by #79
Closed

.NET 6 preview.3 #78

petervandenhout opened this issue Apr 21, 2021 · 4 comments · Fixed by #79
Assignees
Labels
update Dependency updates or framework updates
Milestone

Comments

@petervandenhout
Copy link
Member

Update the code for .Net 6 (preview) to prepare for the release of .Net 6. Keep this in a separate preview branch and release to NuGet as preview packages.

@petervandenhout petervandenhout added the enhancement New feature or request label Apr 21, 2021
@petervandenhout petervandenhout added this to the .NET 6 Update milestone Apr 21, 2021
@petervandenhout petervandenhout self-assigned this Apr 21, 2021
@petervandenhout
Copy link
Member Author

petervandenhout commented Apr 23, 2021

System.Collections.Generic.KeyNotFoundException : Could not find content root for project 'Opw.HttpExceptions.AspNetCore.IntegrationTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in test manifest file 'MvcTestingAppManifest.json'

Opw.HttpExceptions.AspNetCore.DefaultApiBehaviorTests.Authorized_Should_ReturnProblemDetails_UsingHttpResponseMappers
   Source: DefaultApiBehaviorTests.cs line 45
   Duration: 1 ms

  Message: 
    System.Collections.Generic.KeyNotFoundException : Could not find content root for project 'Opw.HttpExceptions.AspNetCore.IntegrationTests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in test manifest file 'MvcTestingAppManifest.json'
  Stack Trace: 
    WebApplicationFactory`1.GetContentRootFromFile(String file)
    WebApplicationFactory`1.SetContentRoot(IWebHostBuilder builder)
    WebApplicationFactory`1.EnsureServer()
    WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers)
    WebApplicationFactory`1.CreateDefaultClient(Uri baseAddress, DelegatingHandler[] handlers)
    WebApplicationFactory`1.CreateClient(WebApplicationFactoryClientOptions options)
    TestWebApplicationFactory`1.CreateClient() line 37
    DefaultApiBehaviorTests.ctor(TestWebApplicationFactory`1 factory) line 20

@petervandenhout
Copy link
Member Author

petervandenhout commented Apr 23, 2021

C# Source Generator - warning CS8032: An instance of analyzer cannot be created

Warning	CS8032	An instance of analyzer Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator cannot be created from 
C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5\Sdks\Microsoft.NET.Sdk.Razor\source-generators\Microsoft.NET.Sdk.Razor.SourceGenerators.dll : 
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
or one of its dependencies. The system cannot find the file specified..	Opw.HttpExceptions.AspNetCore.Sample (netcoreapp3.1)	
C:\Repos\ofpinewood\http-exceptions\samples\Opw.HttpExceptions.AspNetCore.Sample\CSC	1	Active

@petervandenhout petervandenhout added update Dependency updates or framework updates and removed enhancement New feature or request labels Apr 23, 2021
@petervandenhout petervandenhout linked a pull request Apr 23, 2021 that will close this issue
@petervandenhout
Copy link
Member Author

C# Source Generator - warning CS8032: An instance of analyzer cannot be created

Warning	CS8032	An instance of analyzer Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator cannot be created from 
C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5\Sdks\Microsoft.NET.Sdk.Razor\source-generators\Microsoft.NET.Sdk.Razor.SourceGenerators.dll : 
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
or one of its dependencies. The system cannot find the file specified..	Opw.HttpExceptions.AspNetCore.Sample (netcoreapp3.1)	
C:\Repos\ofpinewood\http-exceptions\samples\Opw.HttpExceptions.AspNetCore.Sample\CSC	1	Active

Fixed by adding Microsoft.Net.Compilers version 3.10.0-2.final. To be removed when net6.0 is out of preview.

@petervandenhout petervandenhout changed the title .NET 6 preview .NET 6 preview.3 Apr 23, 2021
petervandenhout added a commit that referenced this issue Apr 23, 2021
* Add net6.0 targetFramework
* Remove obsolete SetCompatibilityVersion and update packages for net6.0
* Fixes for packages issues
@petervandenhout
Copy link
Member Author

Successful update and build for .Net 6 (6.0.100-preview.3.21202.5).

petervandenhout added a commit that referenced this issue Dec 30, 2021
* Add net6.0 targetFramework
* Remove obsolete SetCompatibilityVersion and update packages for net6.0
* Fixes for packages issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
update Dependency updates or framework updates
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant