Visual Studio Custom Tool

Mar 14, 2011 at 10:45 PM

Hello,

How the Custom Tool work ?

I set the Custom Tool property of my .sdf database in VS 2010 but I have an error message 'Cannot finc custom tool 'SQLCECodeGenerator' on this system' when I try to run custom tool.

And I have installed the .msi file.

Thanks.

Regards, Laedit

Coordinator
Mar 15, 2011 at 7:45 AM

Unfortunately the custom tool currently only works with Visual Studio 2008. I'll add support for Visual Studio 2010 for my next release.

The reason behind this is that I made this project mainly for .NET Compact Framework projects, and it's not possible to target the .NETCF in Visual Studio 2010

Coordinator
Mar 16, 2011 at 11:20 PM

I just added VS 2010 support for the Custom Tool. Try out Build 1.0.3 (http://sqlcecodegen.codeplex.com/releases/view/62669)

Mar 17, 2011 at 6:57 AM

Whaou, it was very fast !

And it works !

Thank you so much ! :D

Mar 17, 2011 at 8:50 AM

新手学习

Coordinator
Mar 17, 2011 at 8:53 AM
dawang2008 wrote:

新手学习

Pardon?

Coordinator
Mar 17, 2011 at 8:53 AM
laedit wrote:

Whaou, it was very fast !

And it works !

Thank you so much ! :D


You're most welcome! If you have any more suggestions then just post them here and I'll work on it immediately (depending on the weight of the task, of course)

May 3, 2011 at 2:28 AM

I have just installed the Visual Studio custom tool (VS2008) and when I entered SQLCECodeGenerator into the Custom Tool property for my database I get an error:

 

The custom tool 'SQLCECodeGenerator' failed. Object reference no set to an instance of an object

 

If I use the UI tool the code seems to be generated just fine.

 

What have I missed?

 

thanks,

 

pete

Coordinator
May 3, 2011 at 7:54 AM

Do you know which version you're running?

May 3, 2011 at 8:47 AM

From: christianhelle

Do you know which version you're running?

Yes, version 1.0.3.17

Do you have a sample application that uses the data access layer I can have a look at?


Thanks,


pete



-- 

+--
 

DISCLAIMER:

The information contained in this e-mail message and any attachment hereto is privileged and confidential, and 
is intended only for the use of the recipient and others who have been specifically authorised to receive it.

If you are not the intended recipient, you are hereby notified that any dissemination, distribution, disclosure,
 use or copy of this communication, or the making and retention of a copy of this communication, is strictly 
prohibited. If you have received this communication in error, please contact the sender by return e-mail.

We are not responsible for any loss or damage caused as a result of any viruses which may be contained within 
attachments to this e-mail and recommend that all attachments be scanned for viruses prior to opening.
Coordinator
May 3, 2011 at 9:04 AM

I just tried installing the latest version (v1.0.3.17 downloaded from CodePlex) on a freshly installed virtual machine and it seems to work. Try closing all visual studio instances then re-installing the latest version

May 3, 2011 at 9:30 AM
Ok.

do you have a sample application?

From: christianhelle

I just tried installing the latest version (v1.0.3.17 downloaded from CodePlex) on a freshly installed virtual machine and it seems to work. Try closing all visual studio instances then re-installing the latest version



-- 

+--
 

DISCLAIMER:

The information contained in this e-mail message and any attachment hereto is privileged and confidential, and 
is intended only for the use of the recipient and others who have been specifically authorised to receive it.

If you are not the intended recipient, you are hereby notified that any dissemination, distribution, disclosure,
 use or copy of this communication, or the making and retention of a copy of this communication, is strictly 
prohibited. If you have received this communication in error, please contact the sender by return e-mail.

We are not responsible for any loss or damage caused as a result of any viruses which may be contained within 
attachments to this e-mail and recommend that all attachments be scanned for viruses prior to opening.
Coordinator
May 3, 2011 at 10:03 AM

I uploaded a project I created just now that uses version 1.0.3.17 here:

https://cid-ca531e7fb4762c70.office.live.com/self.aspx/Code%20Samples/SQLCeCodeGenTest.zip

May 3, 2011 at 10:52 PM

From: christianhelle

I uploaded a project I created just now that uses version 1.0.3.17 here:

https://cid-ca531e7fb4762c70.office.live.com/self.aspx/Code%20Samples/SQLCeCodeGenTest.zip

Thank you. I added my database to your test application and the custom tool ran just fine and created the data layer. I then retried to add the database to my application and received the same error again. The only difference that I can see is that your application is a console application whilst mine is a Winforms (targetting Windows Mobile 6.5).


Do you have a small example of using the generated classes?



thanks,


pete





-- 

+--
 

DISCLAIMER:

The information contained in this e-mail message and any attachment hereto is privileged and confidential, and 
is intended only for the use of the recipient and others who have been specifically authorised to receive it.

If you are not the intended recipient, you are hereby notified that any dissemination, distribution, disclosure,
 use or copy of this communication, or the making and retention of a copy of this communication, is strictly 
prohibited. If you have received this communication in error, please contact the sender by return e-mail.

We are not responsible for any loss or damage caused as a result of any viruses which may be contained within 
attachments to this e-mail and recommend that all attachments be scanned for viruses prior to opening.
Coordinator
May 4, 2011 at 8:04 AM
pjhrath wrote:

Thank you. I added my database to your test application and the custom tool ran just fine and created the data layer. I then retried to add the database to my application and received the same error again. The only difference that I can see is that your application is a console application whilst mine is a Winforms (targetting Windows Mobile 6.5).

Do you have a small example of using the generated classes?

I designed the tool with .NETCF in mind, the full framework support just came for free. I haven't tried your scenario out since I never needed 2 databases in 2 project. But I'll investigate and keep you posted.

Thanks for informing me :)

May 4, 2011 at 8:21 AM

pjhrath wrote:

Thank you. I added my database to your test application and the custom tool ran just fine and created the data layer. I then retried to add the database to my application and received the same error again. The only difference that I can see is that your application is a console application whilst mine is a Winforms (targetting Windows Mobile 6.5).

Do you have a small example of using the generated classes?

I designed the tool with .NETCF in mind, the full framework support just came for free. I haven't tried your scenario out since I never needed 2 databases in 2 project. But I'll investigate and keep you posted.


Oh, the only reason that I added the second database was to see if there was a problem caused by the database not because I had a requirement for 2 databases.

My application is a smart device application forms application.

Thanks for informing me :)



-- 

+--
 

DISCLAIMER:

The information contained in this e-mail message and any attachment hereto is privileged and confidential, and 
is intended only for the use of the recipient and others who have been specifically authorised to receive it.

If you are not the intended recipient, you are hereby notified that any dissemination, distribution, disclosure,
 use or copy of this communication, or the making and retention of a copy of this communication, is strictly 
prohibited. If you have received this communication in error, please contact the sender by return e-mail.

We are not responsible for any loss or damage caused as a result of any viruses which may be contained within 
attachments to this e-mail and recommend that all attachments be scanned for viruses prior to opening.
Coordinator
May 4, 2011 at 10:08 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
May 4, 2011 at 3:33 PM

Hi pjhrath,

I just checked in some stable code that resolves the smart device project custom tool exception. I'll prepare a release soon :)