-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
PMC Tools fail when directory contains "[" #16649
Comments
proj:
|
@yangbocheng Can you post the project/solution here? |
I hava found the reason, maybe it's a problem about path. If the name of folder contains "[" or "[any]", Use "Add-migration", it will produce the error
|
/cc @bricelam |
PM> Add-Migration Init
Unable to resolve startup project ''.
Using project 'ConsoleApp[6]' as the startup project.
Build started...
Build succeeded.
System.IO.FileLoadException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type, ObjectHandleOnStack keepAlive)
at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String dataDirectory, String rootNamespace, String language, String[] remainingArguments)
at Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor(String[] remainingArguments)
at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute(String[] args)
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) csproj <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>ConsoleApp_6_</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.0-preview.7.20365.15">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.7.20365.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-preview.7.20365.15">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project> Containing folder name |
renaming folders/solution/csproj file to remove brackets make it work. |
|
Will try with that. There were also few mistakes on my part. Probably need to run restore again after renames? |
I'm also happy to take over the investigation too, if you want. I was going to tackle this one alongside the network path issues. |
I saw poachable label so I was looking if this is something I can even understand. Up to you, feel free to un-assign me if you want to take over. I can dig in with my little knowledge and some guidance. 😨 |
I'll take it and free you up to add more value elsewhere. 😉 |
These parameters accepted wildcard characters causing problems. Fixes dotnet#16649
These parameters accepted wildcard characters causing problems. Fixes dotnet#16649
These parameters accepted wildcard characters causing problems. Fixes #16649
I want your help
I have created a totally new Net Core SDK 2.2.0 web program.(named "web2_2new")
Just edit this .csproj, and then test Add-Migration. Then it tells:
PM> add-migration vc1
Unable to resolve startup project ''.
Using project 'web2_2new' as the startup project.
Your startup project 'web2_2new' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.
proj:
netcoreapp2.2 InProcessThe text was updated successfully, but these errors were encountered: