Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve support of WPF projects #405

Merged
merged 1 commit into from
Nov 15, 2019
Merged

Improve support of WPF projects #405

merged 1 commit into from
Nov 15, 2019

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented Nov 15, 2019

Workaround for #404 till the dependent bugs we have open against NuGet are resolved.

This workaround is only complete with two xml snippets added to a WPF project:

Add this just under the opening <Project> tag:

  <Import Project="$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.props"
          Condition=" '$(_TargetAssemblyProjectName)' != '' and '$(ImportProjectExtensionProps)' != 'false' and exists('$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.props')" />

Add this just above the closing </Project> tag:

  <Import Project="$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.targets"
          Condition=" '$(_TargetAssemblyProjectName)' != '' and '$(ImportProjectExtensionProps)' != 'false' and exists('$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.targets')" />

This is tested to work both for .NET Framework WPF projects and .NET Core WPF projects.

@AArnott AArnott added this to the v3.1 milestone Nov 15, 2019
@AArnott AArnott self-assigned this Nov 15, 2019
Workaround for #404 till the dependent bugs we have open against NuGet are resolved.

This workaround is only complete with two xml snippets added to a WPF project:

Add this just under the opening `<Project>` tag:

```xml
  <Import Project="$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.props"
          Condition=" '$(_TargetAssemblyProjectName)' != '' and '$(ImportProjectExtensionProps)' != 'false' and exists('$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.props')" />
```

Add this just above the closing `</Project>` tag:

```xml
  <Import Project="$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.targets"
          Condition=" '$(_TargetAssemblyProjectName)' != '' and '$(ImportProjectExtensionProps)' != 'false' and exists('$(BaseIntermediateOutputPath)$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g.targets')" />
```

This is tested to work both for .NET Framework WPF projects and .NET Core WPF projects.
@AArnott AArnott changed the base branch from master to v3.0 November 15, 2019 04:30
@AArnott AArnott modified the milestones: v3.1, 3.0 Nov 15, 2019
@AArnott
Copy link
Collaborator Author

AArnott commented Nov 15, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

1 participant