<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with ESRIRegAsm in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738857#M19600</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am getting an error "&lt;STRONG&gt;This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded&lt;/STRONG&gt;" when targeting 4.0.&amp;nbsp;&amp;nbsp; I'm hoping that there is a workaround, esp after you've added support for VS2010 in Beta 2, so overlooking this seems weird.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a side effect of .NET 4.0 no longer uses CLR 2.0 as .NET 2.0/3.0/3.5 do; therefore, mixed-mode assemblies building against CLR 2.0 is unable to load .NET 4.0 assemblies by default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can workaround this issue by placing a esriRegasm.exe.config file in the same folder as esriRegasm.exe (e.g. under C:\program files\common files\arcgis\bin) with the following content -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;configuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;startup useLegacyV2RuntimeActivationPolicy="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supportedRuntime version="v2.0.50727" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supportedRuntime version="v4.0.21006" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/startup&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/configuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since .NET 4.0 and Visual Studio 2010 are still in beta, we are expecting issues to be resolved while we are still testing it internally.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2010 19:28:05 GMT</pubDate>
    <dc:creator>EagerIp</dc:creator>
    <dc:date>2010-02-04T19:28:05Z</dc:date>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738851#M19594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One of our projects is failing to build when registering the assembly.&amp;nbsp; when run with the error code option we get the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Managed Exception: Exception has been thrown by the target of an invocation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Operation Failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;00938700&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In our xml project file we have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;Target Name="BeforeClean"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe &amp;amp;quot;$(TargetPath)&amp;amp;quot; /v 9.4 /p Desktop /u /s /e" Condition="Exists('$(TargetPath)')" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/Target&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;Target Name="AfterBuild"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe &amp;amp;quot;$(TargetPath)&amp;amp;quot; /v 9.4 /p Desktop /s /e" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/Target&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2010 11:27:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738851#M19594</guid>
      <dc:creator>RobertClark</dc:creator>
      <dc:date>2010-02-01T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738852#M19595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By any chance this project targets .NET framework 4.0 (created via Visual Studio 2010 beta)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also try to catch more debugging information by using the /e flag in esriRegasm.exe in the cmd prompt against the compiled dll; e.g. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"C:\program files\common files\arcgis\bin\esriregasm.exe" "failedAssembly.dll" /e /p Desktop /v 9.4&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2010 19:21:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738852#M19595</guid>
      <dc:creator>EagerIp</dc:creator>
      <dc:date>2010-02-01T19:21:18Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738853#M19596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi - no this is created in VS 2008 and targets .NET framework 2.0.&amp;nbsp; We did the /e to get the debug information which gave us the following messages:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Managed Exception: Exception has been thrown by the target of an invocation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Operation Failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;00938700&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:28:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738853#M19596</guid>
      <dc:creator>RobertClark</dc:creator>
      <dc:date>2010-02-02T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738854#M19597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK. The /e option doesn't give a lot of information. Can you try to debug if the error stems from any of the ComRegisterFunction() inside the failed assembly? You can do so by setting esriRegasm.exe as the debugging external program in Visual Studio. (And it is better if you remove or comment out the BeforeClean/AfterBuild xml from the project file before debugging.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Under Start Action&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start external program: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\Program Files\Common Files\ArcGIS\bin\ESRIRegAsm.exe&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Under Start Options&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Command line arguments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"failedAssembly.dll" /p:Desktop /e &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Working directory:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{directory of the failedAssembly.dll}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 20:34:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738854#M19597</guid>
      <dc:creator>EagerIp</dc:creator>
      <dc:date>2010-02-02T20:34:42Z</dc:date>
    </item>
    <item>
      <title>NET 4.0</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738855#M19598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;By any chance this project targets .NET framework 4.0 (created via Visual Studio 2010 beta)? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting an error "&lt;/SPAN&gt;&lt;STRONG&gt;This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded&lt;/STRONG&gt;&lt;SPAN&gt;" when targeting 4.0.&amp;nbsp;&amp;nbsp; I'm hoping that there is a workaround, esp after you've added support for VS2010 in Beta 2, so overlooking this seems weird.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 03:35:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738855#M19598</guid>
      <dc:creator>MarcBate</dc:creator>
      <dc:date>2010-02-04T03:35:18Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738856#M19599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;sorporbear,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is fixed now, there was some additional code in the register function that was causing the issue - not sure why it was in that method in the first place but anyways I've removed it and it works as usual - thanks for the pointers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 14:00:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738856#M19599</guid>
      <dc:creator>RobertClark</dc:creator>
      <dc:date>2010-02-04T14:00:28Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738857#M19600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am getting an error "&lt;STRONG&gt;This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded&lt;/STRONG&gt;" when targeting 4.0.&amp;nbsp;&amp;nbsp; I'm hoping that there is a workaround, esp after you've added support for VS2010 in Beta 2, so overlooking this seems weird.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a side effect of .NET 4.0 no longer uses CLR 2.0 as .NET 2.0/3.0/3.5 do; therefore, mixed-mode assemblies building against CLR 2.0 is unable to load .NET 4.0 assemblies by default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can workaround this issue by placing a esriRegasm.exe.config file in the same folder as esriRegasm.exe (e.g. under C:\program files\common files\arcgis\bin) with the following content -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;configuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;startup useLegacyV2RuntimeActivationPolicy="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supportedRuntime version="v2.0.50727" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;supportedRuntime version="v4.0.21006" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/startup&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/configuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since .NET 4.0 and Visual Studio 2010 are still in beta, we are expecting issues to be resolved while we are still testing it internally.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 19:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738857#M19600</guid>
      <dc:creator>EagerIp</dc:creator>
      <dc:date>2010-02-04T19:28:05Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738858#M19601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can workaround this issue by placing a esriRegasm.exe.config file in the same folder as esriRegasm.exe (e.g. under C:\program files\common files\arcgis\bin) with the following content &lt;BR /&gt; &lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR /&gt;&amp;lt;configuration&amp;gt;&lt;BR /&gt;&amp;lt;startup useLegacyV2RuntimeActivationPolicy="true"&amp;gt;&lt;BR /&gt;&amp;lt;supportedRuntime version="v2.0.50727" /&amp;gt;&lt;BR /&gt;&amp;lt;supportedRuntime version="v4.0.21006" /&amp;gt;&lt;BR /&gt;&amp;lt;/startup&amp;gt;&lt;BR /&gt;&amp;lt;/configuration&amp;gt; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I took out the &lt;/SPAN&gt;&lt;SPAN style="color: red; font-family: Courier New;"&gt;&amp;lt;supportedRuntime version="v2.0.50727" /&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; line, it WORKED! &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is the file if anyone is interested.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Feb 2010 02:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738858#M19601</guid>
      <dc:creator>MarcBate</dc:creator>
      <dc:date>2010-02-06T02:07:28Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738859#M19602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, the ordering of the supportedRuntime is reversed. It should list 4.0 first so if your machine has .NET 4.0 installed, it will load; otherwise, 2.0 is used. Also, you can omit the build number (especially .NET 4.0 is still not final). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following .config file will work on a machine with .NET 2.0 through 3.5 +/- .NET 4.0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;configuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;startup useLegacyV2RuntimeActivationPolicy="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;supportedRuntime version="v4.0" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;supportedRuntime version="v2.0" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/startup&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/configuration&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 18:04:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738859#M19602</guid>
      <dc:creator>EagerIp</dc:creator>
      <dc:date>2010-02-08T18:04:31Z</dc:date>
    </item>
    <item>
      <title>Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738860#M19603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, changing it to just 4.0 worked with the VS2010 RC. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attached is the file to help others save a little time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 18:24:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738860#M19603</guid>
      <dc:creator>MarcBate</dc:creator>
      <dc:date>2010-02-11T18:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Beta 10: Issue with ESRIRegAsm</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738861#M19604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Be carefully to have the right cmd-prompt! At 64bit-systems you need the cmd from %windir%\SysWOW64 - otherwise esriRegasm throws strange errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://geekswithblogs.net/mapfel/archive/2011/04/26/145053.aspx"&gt;http://geekswithblogs.net/mapfel/archive/2011/04/26/145053.aspx&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 17:56:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-esriregasm/m-p/738861#M19604</guid>
      <dc:creator>MarkoApfel</dc:creator>
      <dc:date>2011-04-26T17:56:55Z</dc:date>
    </item>
  </channel>
</rss>

