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

Create config file for test project targeting .NET Framework #642

Merged
merged 2 commits into from
Mar 22, 2017

Conversation

Faizan2304
Copy link
Contributor

@Faizan2304 Faizan2304 commented Mar 21, 2017

Issue:

  1. Binding Redirects necessary to run Unit Tests on .NET Framework are not preserved when running in testhost #428
  2. Cannot use MSBuildWorkspace in .NET Core net46 mstest test assembly #595

Fix:
Generate config file for test project targeting .NET Framework. This config file has have binding redirect which is needed at time of running tests.

1) microsoft#613
2) microsoft#428
3) microsoft#391
4) microsoft#595

Fix:
Generate config file for test project targeting .NET Framework. This config file has have binding redirect which is needed at time of running tests.
@msftclas
Copy link

@Faizan2304,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Generate config file for test project targeting .NET Framework. This config file has have binding redirect which
is needed at time of running tests.
-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this ensure it is created only for net46 and other Desktop targets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be documented in msdn: https://msdn.microsoft.com/en-us/library/2fc472t2(v=vs.110).aspx

Why is it required?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@codito codito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, request few clarifications

@Faizan2304
Copy link
Contributor Author

@dotnet-bot test Windows / Release Build please

@@ -41,6 +41,15 @@
<PropertyGroup>
<DebugType Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">Full</DebugType>
</PropertyGroup>

<!--
Generate config file for test project targeting .NET Framework. This config file has have binding redirect which
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "This config file has binding redirects needed to run tests."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

-->
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Faizan2304
Copy link
Contributor Author

@dotnet-bot test Windows / Release Build please

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 this pull request may close these issues.

6 participants