Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

netcoreapp1.0 - Type.GetTypeFromProgID - Error: 'Type' does not contain a definition for 'GetTypeFromProgID'

$
0
0

I'm upgrading a .NET Core web application from RC2 to RTM. It used to use DNX451, but now it uses the dotnet CLI. 

Unfortunately, this app has some code that relies on loading a COM library. 

var comType = Type.GetTypeFromProgID("ABCCrypto2.Crypto");


This code works when I use:

"frameworks": {"net461": {}
  },


But I need to deploy this app as a portable (framework dependent) app, so I changed the above json to:

"frameworks": {"netcoreapp1.0": {
    }
  },


However, when I use netcoreapp1.0, I get the error: 'Type' does not contain a definition for 'GetTypeFromProgID'

Questions:

1. How can I do a portable deployment while still being able to use Type.GetTypeFromProgID?

2. If question 1 is not possible, is there any other way to load this COM/dll that still allows for me to do a portable deployment?

Thanks so much for the help!



Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>