Adjusting DLLs in VS

Adjusting DLLs in VS


   I had an old Visual Studio project where I had a mismatch of old v12.1 third-party Dlls in the deployment folder but had v13.1 references in the code of the project. So I needed to downgrade, however most of the time you are modernizing instead.

1. The Project Files (.csproj or .vbproj)
Open the files in a text editor and look for the <Reference> tags. 
  • Change the reference names from DllName.v13.1 to DllName.v12.1.
  • Change from Version=13.1.x.x to Version=12.1.x.x matching your actual DLLs.
  • Verify <HintPath> points to your local Lib folder where you put the renamed v12.1 DLLs.
2. Configuration Files (web.config or app.config)
Third parties often registers their HTTP handlers, modules, and compilation assemblies here.
  • Replace all instances of v13.1 and Version=13.1.x.x with 12.1 equivalents.
3. The License File (licenses.licx)
This file lives inside your project's Properties or My Project folder. It contains line-by-line strong names of every control used at design time.  
  • The easiest fix: Open licenses.licx and delete everything inside it (leave it blank). Visual Studio will automatically regenerate the correct v12.1 licensing data when you open a form/view and rebuild the project. 
  • If licenses.licx is missing
    1. Create a blank file manually:
      • Right-click your project (or the Properties folder) in the Solution Explorer.
      • Select Add > New Item... and choose Text Document.
      • Name the file licenses.licx (make sure it doesn't end in .txt). 
    2. Set Build Action:
      • Click on the new licenses.licx file.
      • Open the Properties window (F4).
      • Change Build Action to Embedded Resource
    3. Populate or leave empty:
      • Leave it blank, or open a relevant Windows Form/designer component in Visual Studio and Rebuild the project so Visual Studio populates the required licensed component entries automatically.
4. UI Layout Files (.aspx, .ascx, .master, or .xaml)
If this is a Web application (WebForms) or a WPF application, the pages themselves house reference tags at the very top: 
  • WebForms: Look for <%@ Register Assembly="DevExpress.Web.v13.1..." %> inside your views and update them.
  • WPF/XAML: Check the XML namespace (xmlns) definitions targeting DevExpress controls.

Post-Edit Cleanup
After you have finished replacing the text across your files, do not build the project immediately. Complete these cleanup steps first to clear the cache: 
  1. Close Visual Studio.
  2. Go into your project folder and completely delete the bin and obj folders. (If you don't, Visual Studio will cache the old v13.1 footprints, causing build conflicts).
  3. Reopen Visual Studio and click Build > Clean Solution, followed by Build > Rebuild Solution.


If need to break old version control links,

1. Files and Folders to Delete
Search your entire solution directory and subdirectories for these specific files and delete them:
  • *.vssscc and *.vspscc (Visual Studio Team Foundation / TFS binding files)
  • *.scc and vssver.scc / vssver2.scc (Visual SourceSafe files)
  • The hidden .vs folder in the root solution directory (stores local user options and caches)  
2. Edit the Solution File (.sln)
  1. Open your .sln file in a plain text editor like Notepad.
  2. Find and remove the entire block starting with GlobalSection(TeamFoundationVersionControl) = preSolution or GlobalSection(SourceCodeControl) = preSolution down to EndGlobalSection.
  3. Save the file.  
3. Edit the Project Files (.csproj)
  1. Open each individual project file (e.g., *.csproj) in Notepad. 
  2. Look for XML tags starting with Scc inside the <PropertyGroup> tags and delete them:
    • SccProjectName
    • SccLocalPath
    • SccAuxPath
    • SccProvider  
  3. Save the project files

Comments

Popular posts from this blog

GHL Email Campaigns

Await

Free AI Tools