Search

UnitTest for C++/CLI runtime error about useLegacyV2RuntimeActivationPolicy by Miaodadao

Closed
as Not Reproducible Help for as Not Reproducible

1
0
Sign in
to vote
Type: Bug
ID: 780750
Opened: 3/5/2013 8:07:31 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I use VS2012 write a C++/CLI UnitTest project use .net framework 4.0, which reference LuaInterface.dll (v2.0.0.16708), when I run the test, failed.
Then I add an app.config to the test project, failed again.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

1. Create a C++/CLI UnitTest project use .net framework 4.0 with VS2012
2. Add an reference to LuaInterface.dll (download here: http://luaforge.net/projects/luainterface/)
3. gcnew LuaInterface::Lua(); in the [TestInitialize] method
4. Run it, fail.
5. Add app.config with:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
    </startup>
</configuration>
6. Run it, fail again.

Product Language

Chinese - Simplified

Operating System

Windows 8

Operating System Language

Chinese (Simplified)

Actual results

测试名称:    TestLoad
测试全名:    TableLoadLuaTest.LoadTest.TestLoad
测试源:    .....\tableload.luatest\loadtest.cpp: 第 78 行
测试结果:    未通过
测试持续时间:    0:00:00.0358893

结果 的消息:    初始化方法 TableLoadLuaTest.LoadTest.MyTestInitialize 引发异常。System.IO.FileLoadException: System.IO.FileLoadException: 混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。。
结果 的堆栈跟踪:    
在 LuaInterface.Lua..ctor()
在 TableLoadLuaTest.LoadTest.MyTestInitialize()

Expected results

UnitTest OK.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 3/14/2013 at 2:48 AM
Hi, given that we have not heard back from you in 7 days. We will go ahead and close this Connect Issue. If you get a chance to review and provide the information requested earlier, you can go ahead and reactivate this issue.
Posted by Microsoft on 3/11/2013 at 6:32 AM
Hello,

Sorry for bothering. Is there any update?

It would be greatly appreciated if you could provide us with that information as quickly as possible.

Thank you!
Posted by Microsoft on 3/7/2013 at 4:51 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

Please submit this information to us within 4 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 3/5/2013 at 8:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.