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

Can't Recreate sample #136

Open
KuraiAndras opened this issue Feb 20, 2020 · 5 comments
Open

Can't Recreate sample #136

KuraiAndras opened this issue Feb 20, 2020 · 5 comments

Comments

@KuraiAndras
Copy link

I'm trying to recreate a scenario similar to the Integrated Dependencies sample, but it is not working properly.

The difference is that I'm trying to migrate from a scenario where the dependencies are already working via the unity package manager and dlls, and then migrating to msb4u dependencies.

When I recreate the dependencies via a project referenc to the shared project, I get errors when trying to build the project:

D:\ComplexEf\ComplexEf.Unity.Shared\Assets\ComplexEf.Unity.Shared.Dependencies.msb4u.csproj(33,3): error MSB4019: The imported project
D:\ComplexEf\ComplexEf.Unity.Shared\MSBuild\Projects\ComplexEf.Unity.Shared.Dependencies.msb4u.g.props" was not found. Confirm that the expression in the Import declaration
D:\ComplexEf\ComplexEf.Unity.Shared\MSBuild\Projects\ComplexEf.Unity.Shared.Dependencies.msb4u.g.props" is correct, and that the file exists on disk.

I checked and indeed the file is not there

On clean and rebuild i get the same result.

When tying to regenerate the c# sdk project:

KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.SortedDictionary`2[TKey,TValue].get_Item (TKey key) (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
Microsoft.Build.Unity.ProjectGeneration.Exporters.TemplatedExporter.TemplatedSolutionExporter.WriteProject (Microsoft.Build.Unity.ProjectGeneration.Exporters.TemplatedExporter.TemplatedWriter solutionWriter, System.Guid projectGuid, Microsoft.Build.Unity.ProjectGeneration.Exporters.SolutionProject project) (at Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20200131.11/Editor/ProjectGenerator/Scripts/Exporters/TemplatedExporter/TemplatedSolutionExporter.cs:240)
Microsoft.Build.Unity.ProjectGeneration.Exporters.TemplatedExporter.TemplatedSolutionExporter.Write () (at Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20200131.11/Editor/ProjectGenerator/Scripts/Exporters/TemplatedExporter/TemplatedSolutionExporter.cs:124)
Microsoft.Build.Unity.ProjectGeneration.UnityProjectInfo.ExportSolution (Microsoft.Build.Unity.ProjectGeneration.Exporters.IUnityProjectExporter unityProjectExporter, System.IO.FileInfo solutionFilePath, System.IO.DirectoryInfo generatedProjectsFolder) (at Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20200131.11/Editor/ProjectGenerator/Scripts/UnityProjectInfo.cs:553)
Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.RegenerateEverything (Microsoft.Build.Unity.ProjectGeneration.UnityProjectInfo unityProjectInfo, System.Boolean completeGeneration) (at Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20200131.11/Editor/ProjectGenerator/Scripts/MSBuildTools.cs:342)
Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.RefreshGeneratedOutput (System.Boolean forceGenerateEverything, System.Boolean forceCompleteGeneration) (at Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20200131.11/Editor/ProjectGenerator/Scripts/MSBuildTools.cs:247)
Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.GenerateSDKProjects () (at Library/PackageCache/com.microsoft.msbuildforunity@0.9.2-20200131.11/Editor/ProjectGenerator/Scripts/MSBuildTools.cs:157)

the sample code is here

@andreiborodin
Copy link
Contributor

@KuraiAndras The sample code provided didn't contain any reference to MSB4U as a package. Also, what DLL were you trying to reference?

Finally, what version of the package are you attempting to use? Try: 0.9.1-20200131.14

@KuraiAndras
Copy link
Author

Sorry, i think i wasn't clear:
I have a sample project where i reference a .net standard project from unity which has nuget dependencies(MediatR, EntityFramework Core, morelinq).

I have managed to reference that project with the unity package manager in the past by adding an asmdef to it, and adding the required dlls (EF, MediatR, etc) to the unity shared project.

Now i want to use msb4u to reference this shared project. I added msb4u to the unity project, deleted the dll, and removed the package manager dependency form the unity project, and added a project reference in the msb4u.csproj to the shared project, just like shown in the IntegratedDependencies sample.

All the steps for this can be seen as individual commits in the sample project i linked on the feature/add-msb4u project,

I'm I have tried using msb4u version 0.9.1-20200131.14 and also 0.9.2-2020131.11, with unity version 2019.3.0f6

@KuraiAndras
Copy link
Author

It seems like the problem is with my unity version 2019.3

@andreiborodin
Copy link
Contributor

It seems like the problem is with my unity version 2019.3

Very likely, I saw it repro in that as well. I haven't had a chance to look into this further than that for now, but will update this issue when I get a chance.

@KuraiAndras
Copy link
Author

@andreiborodin Any update on this?

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

2 participants