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

Vanilla generated project from this template does not compile. #16

Open
nils-a opened this issue Mar 19, 2023 · 6 comments · May be fixed by #18
Open

Vanilla generated project from this template does not compile. #16

nils-a opened this issue Mar 19, 2023 · 6 comments · May be fixed by #18

Comments

@nils-a
Copy link

nils-a commented Mar 19, 2023

The first error that I encounter is

error MSB3823: Non-string resources require the property GenerateResourceUsePreserializedResources to be set to true. [...\src\GitExtensions.PluginTemplate\GitExtensions.PluginTemplate.csproj]
@nils-a
Copy link
Author

nils-a commented Mar 19, 2023

When I add <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources >, the next error is:

error MSB3822: Non-string resources require the System.Resources.Extensions assembly at runtime, but it was not found in this project's references [...\src\GitExtensions.PluginTemplate\GitExtensions.PluginTemplate.csproj]

@nils-a
Copy link
Author

nils-a commented Mar 19, 2023

When I add the missing reference, the next error is:

warning MSB3245: Could not resolve this reference. Could not locate the assembly "ResourceManager". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [...\src\GitExtensions.PluginTemplate\GitExtensions.PluginTemplate.csproj]

error CS0246: The type or namespace name 'GitUIPluginInterfaces' could not be found (are you missing a using directive or an assembly reference?) [...\src\GitExtensions.PluginTemplate\GitExtensions.PluginTemplate.csproj]

Essentially, the references from the downloaded GitExtensions are not found.
This was actually fixed in gitextensions/gitextensions.extensibility@437aacb, but that code is currently not available in a released version.

@nils-a
Copy link
Author

nils-a commented Mar 19, 2023

When GitExtensionsPath is corrected, the next error is:

error CS0012: The type 'Image' is defined in an assembly that is not referenced. 
You must add a reference to assembly 'System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.  [...\src\GitExtensions.PluginTemplate\GitExtensions.PluginTemplate.csproj]

@RussKie
Copy link
Member

RussKie commented Mar 19, 2023

What exactly are you trying to build and what are the steps?

@nils-a
Copy link
Author

nils-a commented Mar 19, 2023

I created a repo from this template and build it using dotnet build GitExtensions.PluginTemplate.sln

@RussKie
Copy link
Member

RussKie commented Mar 19, 2023

The template appears to be still targeting net461, so that'd certainly explain the issues you're observing.
Please have a look at https://github.com/gitextensions/GitExtensions.GerritPlugin - that's probably the most actively developed plugin I'm aware of - that should be give you ideas what tweaks required.

@nils-a nils-a linked a pull request Mar 20, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants