How to Compile WPF Examples in VS 2010?

2 posts, 0 answers
  1. Mark Jerde
    Mark Jerde avatar
    5 posts
    Member since:
    Oct 2009

    Posted 18 May 2010 Link to this post

    Today I upgraded using
    RadControls_for_WPF_2010_1_0422_DEV.msi 

    I copied the Demos folder to my D: drive so I could make changes without elevated rights.  VS2010 did its upgrade but when I built the solution I got 333 errors.  To make sure I didn't mess up I carefully copied the Demos to D:\Telerik 2\Demos and tried again.  333 errors the 2nd time too.  The errors started similar to the first three VS2008 error in this post, 2nd definitions of _EmployeeID etc.  Altova DiffDog confirmed a new file, "Northwind1.designer.cs".

    <?xml version="1.0" encoding="UTF-8"?> 
    <!-- Differencing export generated by Altova® DiffDog® version 2010 rel. 3 (x64) Enterprise Edition - for more information please visit www.altova.com --> 
    <diff_result> 
        <diff_info comparison_mode="text_or_xml"
            <source_left name="C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos" uri="file:///C:/Program%20Files%20(x86)/Telerik/RadControls%20for%20WPF%20Q1%202010/Demos"/> 
            <source_right name="D:\Telerik 2\Demos" uri="file:///D:/Telerik%202/Demos"/> 
        </diff_info> 
        <file_diff location=""
            <changed_content> 
                <file name="app.config"/> 
                <file name="Examples_WPF.CS.csproj"/> 
                <file name="Telerik.Windows.Examples.exe.config"/> 
            </changed_content> 
            <right_content> 
                <file name="Examples_WPF.CS.5.0.ReSharper.user"/> 
                <file name="Examples_WPF.CS.csproj.user"/> 
                <file name="Examples_WPF.CS.sln"/> 
                <file name="Northwind1.designer.cs"/>  <!--  ############ Here  --> 
                <file name="Telerik.Windows.Examples.vshost.exe"/> 
                <file name="Telerik.Windows.Examples.vshost.exe.config"/> 
                <file name="UpgradeLog.XML"/> 
            </right_content> 
        </file_diff> 
    </diff_result> 


    DiffDog found how the new, unwanted file is inserted in the .csproj beginning on line 3026.

        <text_diff left_location="2434" right_location="3026"
            <right_content> 
                <line>    &lt;Compile Include=&quot;Northwind1.designer.cs&quot;&gt;</line> 
                <line>      &lt;AutoGen&gt;True&lt;/AutoGen&gt;</line> 
                <line>      &lt;DesignTime&gt;True&lt;/DesignTime&gt;</line> 
                <line>      &lt;DependentUpon&gt;Northwind.dbml&lt;/DependentUpon&gt;</line> 
                <line>    &lt;/Compile&gt;</line> 
            </right_content> 
        </text_diff> 

    The minimal instructions in the pinned, sealed top post How to Compile WPF Examples in VS 2010 apparently don't work for this release.  Neither PowerGREP nor VS2010 could find the string to change.

    Find all "Global.Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString", Match case, Whole word, Subfolders, Find Results 1, "Entire Solution" 
      Matching lines: 0    Matching files: 0    Total files searched: 1105 
     

    PowerGREP for "NorthwindConnectionString"  
     
         C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\app.config 
      6   <add name="Telerik.Windows.Examples.Properties.Settings.NorthwindConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DataSources\Northwind.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/> 
     
          C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\DatabaseRepository.cs 
     18   this.dataContext = new NorthwindDataContext(Settings.Default.NorthwindConnectionString); 
     53   DataContext db = new DataContext(Settings.Default.NorthwindConnectionString); 
     60   DataContext db = new DataContext(Settings.Default.NorthwindConnectionString); 
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\DatabaseRepository.vb 
     15    Me.dataContext = New NorthwindDataContext(Settings.[Default].NorthwindConnectionString) 
     46    Dim db As New DataContext(Settings.[Default].NorthwindConnectionString) 
     53    Dim db As New DataContext(Settings.[Default].NorthwindConnectionString) 
     
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\Northwind.dbml 
      3    <Connection Mode="AppSettings" ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=
                   C:\_projects\wpf\Development\WPF\DataSources\Northwind.mdf;Integrated Security=True;User Instance=True"  
                   SettingsObjectName="Telerik.Windows.Examples.Properties.Settings" SettingsPropertyName="NorthwindConnectionString1"  
                   Provider="System.Data.SqlClient" /> 
     
            C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\Telerik.Windows.Examples.exe.config 
      6     <add name="Telerik.Windows.Examples.Properties.Settings.NorthwindConnectionString" connectionString= 
                  "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DataSources\Northwind.mdf;Integrated Security=True;
                   User Instance=True" providerName="System.Data.SqlClient"/> 
     
            C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\DataSources\NWindDataSet.Designer.cs 
     5107   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     5353   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     5593   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     5894   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6198   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6456   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6705   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6982   this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     
            C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\DataSources\NWindDataSet.Designer.vb 
     4955   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     5203   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     5463   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     5779   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     6082   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     6338   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     6604   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     6872   Me._connection.ConnectionString = Global.Telerik.Windows.Examples.Properties.Settings.[Default].NorthwindConnectionString 
     
             C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\DataSources\NWindDataSet.xsd 
        7    <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="NorthwindConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Public" Name="NorthwindConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Telerik.Windows.Examples.Properties.Settings.GlobalReference.Default.NorthwindConnectionString" Provider="System.Data.SqlClient" /> 
       12    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.BigOrders" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
       44    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.[Order Details]" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
       76    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.Customers" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
      122    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.Orders" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
      172    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.Invoices" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
      210    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.Categories" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
      240    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
      293    <DbSource ConnectionRef="NorthwindConnectionString (Settings)" DbObjectName="dbo.AddressBook" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill"
     
             C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\DataSources\NWindDataSet1.Designer.cs 
     5110    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     5356    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     5596    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     5897    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6201    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6459    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6708    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     6985    this._connection.ConnectionString = global::Telerik.Windows.Examples.Properties.Settings.Default.NorthwindConnectionString; 
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\GridView\WPF\Performance\ServerSide\Example.xaml.cs 
     50    context = new NorthwindDataContext(Settings.Default.NorthwindConnectionString); 
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\GridView\WPF\Performance\ServerSide\Example.xaml.vb 
     43    context = New NorthwindDataContext(Settings.[Default].NorthwindConnectionString) 
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\Properties\Settings.Designer.cs 
     31    public string NorthwindConnectionString { 
     33            return ((string)(this["NorthwindConnectionString"])); 
     42    public string NorthwindConnectionString1 { 
     44            return ((string)(this["NorthwindConnectionString1"])); 
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\Properties\Settings.Designer.vb 
     31    Public ReadOnly Property NorthwindConnectionString() As String 
     33            Return DirectCast((Me("NorthwindConnectionString")), String) 
     41    Public ReadOnly Property NorthwindConnectionString1() As String 
     43            Return DirectCast((Me("NorthwindConnectionString1")), String) 
     
           C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2010\Demos\Properties\Settings.settings 
      5    <Setting Name="NorthwindConnectionString" Type="(Connection string)" Scope="Application"
     13    <Setting Name="NorthwindConnectionString1" Type="(Connection string)" Scope="Application"
     
    TOTAL:    56 matches in 14 files  (4014 other files without matches are not listed) 
     

    It took me a long time to decide I had not made a mistake.  I would prefer to download a VS2010 set of Demos, rather than convert a VS2080 solution.

    Thanks.

    Mark









  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 21 May 2010 Link to this post

    Hello Mark Jerde,

    I already replied to your support ticket:

    Here is what you can try: open the solution in VS 2010 and after the convertion completes do this:
    Open the Northwind.dbml (you can find it in the root), delete the Northwind1.designer.cs file and finally Save the Northwind.dbml file - it will create another designer class.
    Now you should be able to build the examples successfully.

    Let us know how it goes.


    Sincerely yours,
    Veskoni
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top