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.1toDllName.v12.1. - Change from
Version=13.1.x.xtoVersion=12.1.x.xmatching your actual DLLs. - Verify
<HintPath>points to your localLibfolder where you put the renamedv12.1DLLs.
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.1andVersion=13.1.x.xwith12.1equivalents.
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.licxand 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
- Create a blank file manually:
- Right-click your project (or the
Propertiesfolder) 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).
- Right-click your project (or the
- Set Build Action:
- Click on the new
licenses.licxfile. - Open the Properties window (F4).
- Change Build Action to Embedded Resource.
- Click on the new
- 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.
- Create a blank file manually:
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:
- Close Visual Studio.
- Go into your project folder and completely delete the
binandobjfolders. (If you don't, Visual Studio will cache the oldv13.1footprints, causing build conflicts). - 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:
*.vsssccand*.vspscc(Visual Studio Team Foundation / TFS binding files)*.sccandvssver.scc/vssver2.scc(Visual SourceSafe files)- The hidden
.vsfolder in the root solution directory (stores local user options and caches)
2. Edit the Solution File (
.sln)- Open your
.slnfile in a plain text editor like Notepad. - Find and remove the entire block starting with
GlobalSection(TeamFoundationVersionControl) = preSolutionorGlobalSection(SourceCodeControl) = preSolutiondown toEndGlobalSection. - Save the file.
3. Edit the Project Files (
.csproj)- Open each individual project file (e.g.,
*.csproj) in Notepad. - Look for XML tags starting with
Sccinside the<PropertyGroup>tags and delete them:SccProjectNameSccLocalPathSccAuxPathSccProvider
- Save the project files
Comments
Post a Comment