Creating a dataset.designer.vb from XSD - vb.net

I have an .xsd, .vb, .xsc, and .xss file for a dataset in Visual Studio 2008 that I copied over from another Visual Studio project, however I need to make changes to the dataset. Thus I got into the XSD file, created new columns, deleted ones that aren't needed, etc., etc. However I realized when I attempted to use the new dataset I did not have the Visual Basic code behind the scenes. This code is typically found in dataset.designer.vb. When I copied the old one over of course it was no longer valid since columns changed.
How I can force Visual Studio 2008 to use a .xsd file and to have it create/update its designer code?

You just have to exclude your .xsd file and include it again. It will regenerate your designer.vb file.

I don't know if this is still a common problem for others, but I did find an answer (I think). Click the .xsd file in Solution Explorer. Update the "Custom Tool" property to "MSDataSetGenerator". This will automatically regenerate the *.Designer.vb file.

You can right click the .xsd file and select 'Run Custom Tool' to regenerate the dataset.designer.vb file.

THANKS for the help, in the end I JUST was able to get a dataset.vb file generated using the xsd.exe tool. It works for now, however, I still think something isn't set right in Visual Studio 2008 or at least the "Generate Dataset" menu option from the context menu on an XSD file is gone.
I'll just need to remember that if I modify the XSD file from here on out that Visual Studio isn't updating the .vb file automatically, I'll probably get stuck with reusing the xsd.exe program.
For others the command is (using Visual Studio 2008 Command Prompt Window Tool, in Admin mode if using Windows Vista).
xsd.exe /d /l:VB "XSD FILE LOCATION PATH"
/d means create a dataset code. /l is the language.
The .vb file will be created in C:\Windows\System32.

Unfortunately, this is in the gray area of things things that I can do when I need to, but I haven't needed to do enough to impart the knowledge to others.
All I know is that *.designer.vb means that this code was generated by Visual Studio, and if it generated it once it can do it again. Additionally, the very few times (maybe twice, both in Visual Studio 2005) that I have done this, it seemed like it was as simple as adding the *.xsd file to Solution Explorer. If that alone doesn't do it, try showing all files or right/double clicking on the *.xsd.

Just delete the extra designer.vb file created when u add the xsd file.

Related

View PDF in Visual Studio Code or Visual Studio

I found somewhere that I can use Visual Studio Code to view PDFs.
The extension used is "PDF Viewer".
Visual Studio Code allows multiple panes open to see more than one document at a time. This is the main reason I use it.
I also wanted to have the capability to extract specific pages to images (or copy a page as an image ... but this probably isn't possible).
How can this be done, in Visual Studio Code or Visual Studio?
I'm not a coder or developer, please simplify response.
Thanks.

adding extra files to vb.net project

I am trying to add some 'supporting' files to my project in VB.NET Express 2012. These files are additional files that are not really part of VB.NET such as RTF files which are templates for reports etc. There is also some text based template files, that will get modified as part of the execution of my program.
What I have done:
I have added these to the project (i.e. they appear in the Solution
Explorer under the project)
I have set the 'Copy to Output Directory' of each of the files to
"Copy Always" in the properties window.
When I publish the project and re-install it, none of these files are included.
Any help would be appreciated. Thanks in advance.
From build action you should select "content"

How do I default the visual studio file property "custom tool" for a given file extension?

I have a custom tool "NafestisGenerator" of which I need to apply to every ".ntf" file. The question is, how do I tell visual studio (using the Custom tool Generator sample from Microsoft) to use the "NafestisGenerator" custom tool on every ".ntf" file?
I'm pretty sure (87%) that you do this in Windows Explorer.
I notice that if I double-click a .DOC file in my project, it fires up Microsoft Word. Similarly, double-click on an .XLSX file and it fires up Excel.
So, register .NTF as an extension that your tool handles. Then, when you double-click on an .NTF file in VS, it will fire up your tool.

vb.net vs2010 project deployment problem: eula.rtf is not displayed during application deployment. Any ideas?

I've created a setup and deployment project for my vb.net application using the Visual Studio 2010 wizard. I also added the eula.rtf file to the setup project and set it to install to the user's application folder. I then added a license agreement UI dialog in the setup project and pointed the licenseFile to eula.rtf. However, when testing the resulting setup.msi, the UI License Agreement dialog appears but no text is displayed inside the box where the eula should appear. I tried re-naming the eula and tried to change the encoding of the file but without success. Am I missing something? What should I do to make it work?
Many thanks.
Did you actually create a .rtf in the proper format or did you just rename a text file? You'll need either Wordpad or Microsoft Word to create one. Wordpad is the better choice, it is likelier to create RTF in a format that the rich text box fully supports.

VB.NET 2008 importing forms from another project?

I have some form/vb in another project that I want to import to a new one. There are three files with these extensions - .vb, resx, and designer.vb. Which do I copy and how exactly?
If you are copying the files outside of Visual Studio (e.g. in Windows Explorer) you need to copy all three.
But working in Visual Studio you only need to copy the base .vb file; the .designer.vb and the .resx will be copied for you automatically. How to do this? Right click on your project file in Solution Explorer and choose Add -> Existing Item.
You need to copy all the files. You should even be able to open two instances of Visual Studio and drag and drop the form from one to the other.
Once you do the copy you'll probably want to change the namespaces and/or type names inside the files because they might be pointing to names from the previous project.
You need to copy all files over. If you copy and paste them using the file system, in Visual Studio Solution Explorer they won't appear. You will need to "show all" files. Then everything in the project directory is shown allowing you to right-click them and "include" them in your project.