Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Feb 25, 2016 1:57 pm

When building with debug in asp.net there is no errors and the code works as expected when deployed on the development server, but when switching build modes from Debug to Release, the Spire.License.Dll throws the following error:

Error 197 Could not load file or assembly 'file:///D:\SpirePDF\spire.pdf_3.6.135\BIN\NET4.0\Spire.License.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)


I can't deploy the development build in production, please advise.

[email protected]
 
Posts: 5
Joined: Wed Feb 17, 2016 9:02 pm

Thu Feb 25, 2016 2:52 pm

Deeper look, it looks like it is looking for a folder called SGEN which obviously doesn't exist since it has nothing to do with me or my project, so this has to be something built into the dll, as stated in original post, I can build debug and it works flawlessly, but build Release and it gives the error and shows in the File column of the error list it is looking for SGEN.

Error 5 Could not load file or assembly 'file:///D:\SpirePDF\spire.pdf_3.6.135\BIN\NET4.0\Spire.License.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) D:\*****\SGEN SITE

[email protected]
 
Posts: 5
Joined: Wed Feb 17, 2016 9:02 pm

Thu Feb 25, 2016 3:05 pm

Ok, seriously, Microsoft needs to stop with their crap, this has nothing to do with your DLL, apparently even though I downloaded the latest build and unzipped it into a local drive folder, Microsoft blocked it, so you have to right click on the file and go to Properties and General Tab, at the bottom you click on "unblock" on both the Spire.pdf.dll and Spire.license.dll and then add the dll's to your project as references with copy option, then at that point everything builds just fine.

So you can close this case.

[email protected]
 
Posts: 5
Joined: Wed Feb 17, 2016 9:02 pm

Fri Feb 26, 2016 1:37 am

Hi,

Thanks for your posting and sharing your solution.
Welcome to write to us again if you have further problems.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF