Showing posts with label assembly. Show all posts
Showing posts with label assembly. Show all posts

Tuesday, March 27, 2012

Cannot registering external assembly - System.EnterpriseServices.dll

Hi,

I'm trying to register assembly System.EnterpriseServices.dll. I registred several assemblies, that are referenced:
System.DirectoryServices.dll
System.DirectoryServices.Protocolls.dll
System.Drawing.dll

But then, I found a problem:
While registring System.EnterpriseServices.dll I recieve error message with requirement for registration System.Runtime.Remoting.
While registring System.Runtime.Remoting.dll I recieve error message with requirement for registration System.Web.
An finally, when i try to register System.Web, I recieve message requiring registration of System.EnterpriseServices:

Create failed for SqlAssembly 'System.Web'. (Microsoft.SqlServer.Smo)

Assembly 'system.enterpriseservices, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.' was not found in the SQL catalog.
Warning: The Microsoft .Net frameworks assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=x86.' you are registering is not fully tested in SQL Server hosted environment. (Microsoft SQL Server, Error: 6503)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1314&EvtSrc=MSSQLServer&EvtID=6503&LinkId=20476


All assemblies were loaded from the same folder c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\*.dll
Version of sqlServer 9.00.1314.06

Thanks

This should work if you from SQL Server Management Studio execute the CREATE ASSEMBLY statement against where the dll is originally located:

create assembly entService
from 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll'
with permission_set = UNSAFE

When doing it that way, SQL Server is smart enough to work around the various circular references.

Niels
sql

Thursday, March 22, 2012

cannot P/Invoke SQLCEME30.DLL when debugging Pocket PC 2003 SE Emulator

I'm trying to debug an assembly with System.Data.SqlServerCe - and when I deploy to a IPAQ 2210 - I get no errors! Alas, when I try to debug using the Pocket PC 2003 SE Emulator - I get the "cannot P/Invoke SQLCEME30.DLL" exception.

Can anyone offer directions?

best regards,
Walther

wDiechmann wrote:

I'm trying to debug an assembly with System.Data.SqlServerCe - and when I deploy to a IPAQ 2210 - I get no errors! Alas, when I try to debug using the Pocket PC 2003 SE Emulator - I get the "cannot P/Invoke SQLCEME30.DLL" exception.

Can anyone offer directions?

best regards,
Walther

I tried with a SmallTestProject having nothing except statements to create new "test.sdf" and my take on this is: you cannot debug solutions for smart devices aka Pocket PC 2003 in VS2005, if you want to use the emulator!

Please someone prove me wrong!

a nice weekend from sunny Denmark,
Walther|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=604751&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=438553&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=220816&SiteID=1

|||So are you meant to install the SQLMobile CAB file on the emulator? How will it know that you unstalled the CAB file the last time you loaded up the emulator?

I don't undertstand this.|||

I'm not sure what exactly you do not understand.

You copy the CAB, you click on it - it's now installed. If you save emulator state, it would remain installed. If you don't save the emulator's state - it's all gone on restart, repeat the installation every time emulator is started (or save state).

|||Ahh, right, get you now :)

I didn't know the Emulator state saved things like that (installation of things) :)

I'm guessing that each device model/version has its own emulator state?|||Ilya Tumanov,

I'm afraid I do not see where you're taking me on this!

I debug my apps perfectly allright on the device - but I'm not able to debug apps using the emulator (where no device is involved - just my desktop)

The links you threw my way all talk about copying CABs to the device - but I'm not debugging on the device. I'm debugging on the emulator!?

Sorry if my english is not fluently enough to present my case properly :(

best regards,
Walther|||OK, Walther, judging by what Ilya as stated, you need to install the SQL CAB's onto the Emulator.

To do this, in VS 2005 go to 'Tools'->'Device Emulator Manager', then in the available Emulators select the Emulator you need then go to 'Actions'->'Connect' (wait for Green tick next to Emulator). Then in the Emulator Window go to 'File'->'Configure', then under the 'General' tab in the 'Shared Folder', click the '...' button. Locate to the Bin/debug directory of your application, and ok that. In this directory you should have placed your SQL CAB files.

Now in the Emulator, click 'Start'->'Programs'->'File Explorer'->'My Device'->'Storage Card' - in here should be your CAB files, click on them to install them. Remember to save the Emulator state.

Ilya, is this the correct way of doing it, or is there an easier way?

Thanks
|||

Normally VS 2005 would install NETCF and SQL Mobile automatically as soon as you hit F5. If for some reason that does not work, then installation via mapped folder should work.

As device vs. emulator, there's no difference in this case. You see, emulator is a device, only simulated. You can even Active Sync it if you want in copy files via AS just like you would do with physical device.

cannot P/Invoke SQLCEME30.DLL when debugging Pocket PC 2003 SE Emulator

I'm trying to debug an assembly with System.Data.SqlServerCe - and when I deploy to a IPAQ 2210 - I get no errors! Alas, when I try to debug using the Pocket PC 2003 SE Emulator - I get the "cannot P/Invoke SQLCEME30.DLL" exception.

Can anyone offer directions?

best regards,
Walther

wDiechmann wrote:

I'm trying to debug an assembly with System.Data.SqlServerCe - and when I deploy to a IPAQ 2210 - I get no errors! Alas, when I try to debug using the Pocket PC 2003 SE Emulator - I get the "cannot P/Invoke SQLCEME30.DLL" exception.

Can anyone offer directions?

best regards,
Walther

I tried with a SmallTestProject havingnothing except statements to create new "test.sdf" and my take on this is: you cannot debug solutions for smart devices aka Pocket PC 2003 in VS2005, if you want to use the emulator!

Please someone prove me wrong!

a nice weekend from sunny Denmark,
Walther
|||

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=604751&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=438553&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=220816&SiteID=1

|||So are you meant to install the SQLMobile CAB file on the emulator? How will it know that you unstalled the CAB file the last time you loaded up the emulator?

I don't undertstand this.|||

I'm not sure what exactly you do not understand.

You copy the CAB, you click on it - it's now installed. If you save emulator state, it would remain installed. If you don't save the emulator's state - it's all gone on restart, repeat the installation every time emulator is started (or save state).

|||Ahh, right, get you now :)

I didn't know the Emulator state saved things like that (installation of things) :)

I'm guessing that each device model/version has its own emulator state?|||Ilya Tumanov,

I'm afraid I do not see where you're taking me on this!

I debug my apps perfectly allright on the device - but I'm not able to debug apps using the emulator (where no device is involved - just my desktop)

The links you threw my way all talk about copying CABs to the device - but I'm not debugging on the device. I'm debugging on the emulator!?

Sorry if my english is not fluently enough to present my case properly :(

best regards,
Walther
|||OK, Walther, judging by whatIlya as stated, you need to install the SQL CAB's onto the Emulator.

To do this, in VS 2005 go to 'Tools'->'Device Emulator Manager', then in the available Emulators select the Emulator you need then go to 'Actions'->'Connect' (wait for Green tick next to Emulator). Then in the Emulator Window go to 'File'->'Configure', then under the 'General' tab in the 'Shared Folder', click the '...' button. Locate to the Bin/debug directory of your application, and ok that. In this directory you should have placed your SQL CAB files.

Now in the Emulator, click 'Start'->'Programs'->'File Explorer'->'My Device'->'Storage Card' - in here should be your CAB files, click on them to install them. Remember to save the Emulator state.

Ilya, is this the correct way of doing it, or is there an easier way?

Thanks
|||

Normally VS 2005 would install NETCF and SQL Mobile automatically as soon as you hit F5. If for some reason that does not work, then installation via mapped folder should work.

As device vs. emulator, there's no difference in this case. You see, emulator is a device, only simulated. You can even Active Sync it if you want in copy files via AS just like you would do with physical device.

Friday, February 10, 2012

Cannot find file or assembly error.....

I created an assembly to access my SSRS web service in a Script task. The package runs fine on my machine but gets the following error from the production box.....

The script threw an exception: Could not load file or assembly 'Microsoft.SqlServer.ReportingServices2005, Version=0.0.0.0, Culture=neutral, PublicKeyToken=3bd4760abc5efbcb' or one of its dependencies. The system cannot find the file specified.

I followed the exact same procedures for creating the .dll on the production box as I did developing on my machine...strong name, load to gac etc....but it still cannot find it.

My production SQL Server is 64 bit so perhaps there is another step I need to take? Anyone have a clue as to what I may be missing?

TIA

Well, I found the answer to my own question on the following blog.....

http://www.developerdotstar.com/community/node/333

Apparently, the resolution was to open the package/task in BIDS on the production box and save it and then redeploy. Something about the versioning on the assembly, which is beyond a .Net newbie like me. My guess is when I created/moved the new assembly to the production box it put a new version number on it. To pick up the new number I had to open the package/task so it would load the new assembly with the new version number.

Perhaps one of the MS guys could tell me if there is there a better way I should be doing this? Perhaps through the SSIS deployment configurations...which I have admittedly not been using (have just been importing my packages to the msdb folder in SMS)?