Question Dataset creates new designer.vb file

dsk96m

Well-known member
Joined
Jan 11, 2013
Messages
173
Programming Experience
1-3
For the last few days I have been having an issue with my dataset. I have one dataset. Ever since the other day after i went and configured the dataset to pull a new table from my database, I have been having an issue where when I save it creates a new designer.vb file but adds a one to it. It messes up everything. It is like it can't save the the original so it creates a new one, not sure why. If I look at my programs vbproj file I see this which is after I save and the new file is created.

VB.NET:
    <Compile Include="Core\FlightTestApp2DataSet.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>FlightTestApp2DataSet.xsd</DependentUpon>
    </Compile>
    <Compile Include="Core\FlightTestApp2DataSet.vb">
      <DependentUpon>FlightTestApp2DataSet.xsd</DependentUpon>
    </Compile>
[B]    <Compile Include="Core\FlightTestApp2DataSet1.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>FlightTestApp2DataSet.xsd</DependentUpon>
    </Compile>[/B]



    <None Include="Core\FlightTestApp2DataSet.xsc">
      <DependentUpon>FlightTestApp2DataSet.xsd</DependentUpon>
    </None>
    <None Include="Core\FlightTestApp2DataSet.xsd">
      <Generator>MSDataSetGenerator</Generator>
      <SubType>Designer</SubType>
      <LastGenOutput>FlightTestApp2DataSet1.Designer.vb</LastGenOutput>
    </None>
    <None Include="Core\FlightTestApp2DataSet.xss">
      <DependentUpon>FlightTestApp2DataSet.xsd</DependentUpon>
    </None>

You can see it created this new file with the 1 in the name. I cant figure out why when i configure datasource with the wizard then add save it is creating this new file. Both designer files are listed under the dataset xsd. Simply deleting it doesnt work. Then the new tables I added start acting all funny in the designer. I even went as far as deleting the entire dataset and starting over with it, but that is a pain in the ass.

Any idea how to correct this and what is causing it? Thanks
 
Something has gone awry but it's hard to say what. I would just delete the DataSet altogether and create a new one. As long as the names are the same, any code that makes use of the DataSet will continue to work as it should.
 
Something has gone awry but it's hard to say what. I would just delete the DataSet altogether and create a new one. As long as the names are the same, any code that makes use of the DataSet will continue to work as it should.

delete the code in bold
modify the LastGenOutput that references the ...1.designer.vb (remove the 1)
delete both code files on disk
right click the xsd in VS and choose Run Custom Tool
 
Back
Top