locked
When i open my solution VS change test references automatically

    Pertanyaan

  • Hello

    When i open my solution, in my testing projects, visual studio changes the references for Microsoft.VisualStudio.QualityTools.UnitTestFramework from 10.1.0.0 to 10.0.0.0 automatically. 

    Does anyone know how to avoid this or explain to me the reason?

    Thanks.

     


    EriC#
    02 Februari 2012 10:38

Jawaban

Semua Balasan

  • Hello Eric,

    Yes, I can reproduce the same issue as you. I am sorry that I can’t figure out you the reason about it. You can consider submitting one request on the Microsoft Connect site here:

    https://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    In addition, I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us
    03 Februari 2012 8:41
  • A couple of questions to clarify:

    1. Have you applied VS 2010 SP1?
    2. Is the reference of 10.0.0.0 display OK in project solution explorer?

    This article may help some: http://sparethought.wordpress.com/2011/07/11/troubleshooting-resharper-visual-studio-2010-mstest-and-net-3-5-in-single-bottle/


    • Diedit oleh Dylan Tal 03 Februari 2012 9:54
    03 Februari 2012 9:53
  • Hello, my answers below

    1. Have you applied VS 2010 SP1?
      Yes, we have vs2010 with sp1. (We are a team (10 persons), we all have the same problem
    2. Is the reference of 10.0.0.0 display OK in project solution explorer?
      I do not understand the question but there is nothing strange when Referencing the assembly

     

    Thanks. 


    EriC#
    03 Februari 2012 10:16
  • Hi

    We are also facing the same issue but not everyone in the team has the problem, presumably because of differences in their installations of VS 2010.

    I can add the correct 10.1.0.0 reference and check the project into TFS. However on opening the project again Visual Studio 2010 changes it back to 10.0.0.0. It is impossible to load the project unless the change is made.

    07 Februari 2012 10:31
  • File Microsoft.VisualStudio.QualityTools.UnitTestFramework from 10.1.0.0 is located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\ and targets runtime version v2.0.50727. In order to be able to use this version your test project needs to target .NET Framework 3.5. For more info please see:

    How to: Configure Unit Tests to Target .NET Framework 3.5 http://msdn.microsoft.com/en-us/library/gg601487.aspx

    How to re-target unit-tests to .Net Framework 3.5 in VS 2010 SP1 http://blogs.msdn.com/b/vstsqualitytools/archive/2010/12/19/how-to-re-target-unit-tests-to-net-framework-3-5-in-vs-2010-sp1.aspx

    Before VS 2010 SP1 Test projects were not able to target any other framework but .NET Framework 4


    Trevor Hancock (Microsoft)
    Please remember to "Mark As Answer" the replies that help.

    07 Februari 2012 20:31
  • But i don't want to configure Unit Tests to Target .NET Framework 3.5 my test projects must be configured to .Net Framework 4.0, in fact, they are configured to .Net Framework 4.0,

    EriC#

    08 Februari 2012 10:30
  • Trevor

    Thanks for the info. I was aware that 10.1.0.0 was an update to allow test projects to target 3.5, but does that mean that it cannot be used for test projects that target 4.0.  If not the numbering is a bit confusing (10.0.0.0 is actually more "advanced" than 10.1.0.0)

    Our test projects are currently being updated from targetting 3.5 to 4.0. Does this mean we must convert all references to 10.1.0.0 back to 10.0.0.0?

    Regards

    08 Februari 2012 10:40
  • Thank you!

    I changed all my references to version 10.0.0.0 and that solved the problem.


    EriC#

    08 Februari 2012 14:03