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

Template Generated Solution Will not Build or Update #642

Open
wblackmonridetm opened this issue Nov 28, 2023 · 3 comments
Open

Template Generated Solution Will not Build or Update #642

wblackmonridetm opened this issue Nov 28, 2023 · 3 comments

Comments

@wblackmonridetm
Copy link

  • .NET SDK Version: 8

Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Core' does not exist in the namespace 'Ardalis.CleanArchitecture' (are you missing an assembly reference?) Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 1 Active
Error CS0234 The type or namespace name 'SharedKernel' does not exist in the namespace 'Ardalis' (are you missing an assembly reference?) Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 2 Active
Error CS0246 The type or namespace name 'FastEndpoints' could not be found (are you missing a using directive or an assembly reference?) Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 3 Active
Error CS0246 The type or namespace name 'MediatR' could not be found (are you missing a using directive or an assembly reference?) Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 7 Active
Error CS0246 The type or namespace name 'IMediator' could not be found (are you missing a using directive or an assembly reference?) Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 17 Active
Error CS0308 The non-generic type 'Endpoint' cannot be used with type arguments Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 18 Active
Error IDE1100 Error reading content of source file 'C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.UseCases\obj\Debug\net8.0\Ardalis.CleanArchitecture.UseCases.AssemblyInfo.cs' -- 'Could not find file 'C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.UseCases\obj\Debug\net8.0\Ardalis.CleanArchitecture.UseCases.AssemblyInfo.cs'.'. Ardalis.CleanArchitecture.UseCases C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.UseCases\obj\Debug\net8.0\Ardalis.CleanArchitecture.UseCases.AssemblyInfo.cs 1 Active
Error IDE1100 Error reading content of source file 'C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Infrastructure\obj\Debug\net8.0\Ardalis.CleanArchitecture.Infrastructure.AssemblyInfo.cs' -- 'Could not find file 'C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Infrastructure\obj\Debug\net8.0\Ardalis.CleanArchitecture.Infrastructure.AssemblyInfo.cs'.'. Ardalis.CleanArchitecture.Infrastructure C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Infrastructure\obj\Debug\net8.0\Ardalis.CleanArchitecture.Infrastructure.AssemblyInfo.cs 1 Active
Error CS0103 The name 'Post' does not exist in the current context Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 22 Active
Error CS0103 The name 'AllowAnonymous' does not exist in the current context Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 23 Active
Error CS0103 The name 'Summary' does not exist in the current context Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 24 Active
Error CS0103 The name 'Response' does not exist in the current context Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Contributors\Create.cs 41 Active
Error NU1010 The PackageReference items Serilog.Sinks.ApplicationInsights do not have corresponding PackageVersion. Ardalis.CleanArchitecture.Web C:\Users\wblackmon\source\repos\Ardalis.CleanArchitecture\src\Ardalis.CleanArchitecture.Web\Ardalis.CleanArchitecture.Web.csproj 1

Steps to Reproduce:

  1. Install template using the instructions provided.
  2. Create a new solution based on the template.
@ardalis
Copy link
Owner

ardalis commented Nov 28, 2023

Sorry - the .NET 8 release got messed up yesterday with some GitHub outages. I should have a new one out today that should be working 100%

@ardalis
Copy link
Owner

ardalis commented Nov 28, 2023

Ok, try version 9.0.1 now and see if it works better for you.

https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/9.0.1

dotnet new install Ardalis.CleanArchitecture.Template::9.0.1

@ppvario
Copy link

ppvario commented Dec 6, 2024

Hey!
I am using the template v10.0.0
.NET Version: 9.0.100

I have started getting the following error on my .Web project:
The PackageReference items FastEndpoints.Security;Microsoft.AspNetCore.Authentication.JwtBearer do not have corresponding PackageVersion.
Additionally, I am getting the following when I try to open the Nuget Package Manager:

Value cannot be null.
Parameter name: versionRange

I also have an exclamation mark on my packages under dependencies and they do not seem to have the version:
image

It was running fine untill two days ago. What's strange is that since then I had not made any code changes to my project. Other projects such as .UseCases or .Infrastructure do not have such an issue.
I am assuming it has something to do with Centrally Managed Package Versions:

<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />

I noticed you added a similar issue on the Nuget Repo: NuGet/Home#13627

Do you know what's wrong?

EDIT: A quick workaround that I found was to manually add an entry in Directory.Packages.Props for the two new packages that I added: Fastendpoints.Security and Microsoft.AspNetCore.Authentication.JwtBearer.
Now my question is, how do I ensure that it is added automatically whenever I add a new package through nuget package manager?
The manual way is error prone and the developer may forget to add it.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants