Renamed visual studio project, error when publishing (ResolveAssemblyReference.cache) - visual-studio

My solution contains two projects. Both have been renamed from 'LearnUmbraco.*' to 'OnceUpon.'
The solution builds fine, however when trying to publish via FTP, the error occurs:
Error Copying file obj\Debug\LearnUmbraco.csprojResolveAssemblyReference.cache to obj\Release\Package\PackageTmp\obj\Debug\LearnUmbraco.csprojResolveAssemblyReference.cache failed. Could not find file 'obj\Debug\LearnUmbraco.csprojResolveAssemblyReference.cache'. 0 0 OnceUpon.WebUI
If I look in my obj/Debug folder i do indeed have a ResolveAssemblyReference.cache however it is obviously prefixed with ;OnceUpon.**.'.
Where/how is this file generated. I'd like to change the configuration so it looks for the renamed version.
Many thanks

Found the issue. Close the solution and open the csproj file. The old references were still in there.

Related

Visual studio wrong file path for Form1.cs file

I am trying to open a project which was created on one computer but has since been moved to another one due to the computer going caput. Now when I open the project and try opening the Form1.cs file, or any of the designer files, I get the error message saying "Cannot find the file 'C:...\Form1.cs'. It may have been moved or deleted". I have omitted the full path which is a reference to the old computer.
How do I change the file path so that my project can find it?
I have found another thread on this issue: Visual Studio retrieving an incorrect path to a project from somewhere
Have tried all of the suggestions (deleting .suo files, moving the project to a new folder, etc.) Nothing has worked so far. There is however in the accepted solution a reference to "Manage Workspaces" and "Source Control Explorer", which I literally can't even find in my Visual Studio window.
Help please!
Alexander
First: Open your sln file and see where it says your csproj file is located. It should read something like: "WindowsFormsApp1\WindowsFormsApp1.csproj"
Note: Everything in the parenthesis will be from the same directory as the sln file, so the true directory in this instance will be "sln_file_path\WindowsFormsApp1\WindowsFormsApp1.csproj"
As long as this is correct, then navigate to the csproj file and open it with notepad, but if this path is wrong, correct it before proceeding.
Second: Search the csproj file for the missing file, which in your case is Form1.cs
You should find something like: Compile Include="....\Erroneous_Directory\Form1.cs"
Typically all cs files will be in the same directory as the csproj file, so the line should simply read as follows: Compile Include="Form1.cs"
If the file is legitimately located in a separate directory, then provide the path, but if it is in the same directory, delete the path. Sometimes, when linking to a file in a different project, you will see this: (Link)Form1.cs(/Link), but if the file is in the same project and directory, this link line will need to be deleted.
Note: Chances are that this procedure will need to be repeated for two other files: Form1.Designer.cs and Form1.resx as well, so make sure the "Compile Include" lines for these two files are also correct before opening the solution

A matching symbol file was not found (Cannot find/open pdb file)

The debug point is not getting enabled when this module gets loaded. So I thought of manually loading its debug symbols .pdb file from "Debug/obj" folder.
In this case I am getting below error "A matching symbol" file was not found in this folder though that folder contains currently build file.
And also the "Symbol Load Information" contains these many directory paths.
Cannot find or open the PDB file.
PDB does not match
Screenshot:
This problem is fixed by the following steps-
1) Close all the instances of VISUAL STUDIO if running and open a single instance of Visual Studio
2) Close the solution (nothing but your project) If it's already open and then re-open again
3) Clean the whole project and rebuild it.
4) and also build the project if you are getting any errors like "___.dll not found"
5) Now you are good to go and run your project
After breaking my head on this, for me it happened when I configured my project to seperate binaries from objects that way:
For Output directory:
$(SolutionDir)build\bin\$(PlatformTarget)-$(Configuration)\
For Intermediate Directory:
$(SolutionDir)build\obj\$(PlatformTarget)-$(Configuration)\$(ProjectName)\
Even though the I still had the generated .pdb where my exe or trying to even load it manually, it didn't work.
So I went again to Configuration Properties -> Linker -> Debugging and where the property Generate Program Database File I changed from $(OutDir)$(TargetName).pdb to $(IntDir)$(TargetName).pdb so it will throw the desired database file into the place where the objects(Intermediate Directory) are instead of where the .exe(Output directory). Hopefully that helped someone :)

web deployment package (.zip file) not created in Visual Studio 2013

I am trying to create a deployment package in Visual Studio 2013. I have specified that the package should be placed at C:\Deployment\bin\WebSite.zip - the absolutely simplest location. All the project files build but the publish fails with this error:
Transformed Web.config using C:\Services\IdentityServer\Thinktecture.IdentityServer.v2\src\OnPremise\WebSite\Web.Siloed.config into obj\Siloed\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Areas\Admin\Views\Web.config into obj\Siloed\CSAutoParameterize\transformed\Areas\Admin\Views\Web.config.
Auto ConnectionString Transformed Views\Web.config into obj\Siloed\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Siloed\TransformWebConfig\transformed\Web.config into obj\Siloed\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Siloed\Package\PackageTmp.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2584,5): Error : Copying file ..\..\..\Deployment\bin\um.zip to obj\Siloed\Package\PackageTmp\.ebextensions\um.zip failed. Could not find a part of the path '..\..\..\Deployment\bin\um.zip'.
I have no idea where this path '......\Deployment\bin\um.zip' is coming from. I specified that the deployment package should be created at C:\Deployment\bin\WebSite.zip, not um.zip.
So, I checked out C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(2584,5) and the code looks like this:
<!--Force Copy Of all file to the $(WPPAllFilesInSingleFolder) if needed-->
<CopyPipelineFiles PipelineItems="#(FilesForPackagingFromProject)"
SourceDirectory="$(WebPublishPipelineProjectDirectory)"
TargetDirectory="$(WPPAllFilesInSingleFolder)"
SkipMetadataExcludeTrueItems="True"
UpdateItemSpec="True"
DeleteItemsMarkAsExcludeTrue ="True"
Condition="'#(FilesForPackagingFromProject)' != ''">
<Output TaskParameter="ResultPipelineItems" ItemName="_FilesForPackagingFromProjectTempory"/>
</CopyPipelineFile>
I have tried editing the "PipelineItems" and "SourceDirectory" and have even hardcoded them. But the same message, "Could not find part of the path....", is being displayed every time I run the Publishing. The "Could not find part of the path...." points to the new paths I specified in "PipelineItems" and "SourceDirectory. The .zip file never seems to get created anywhere. I have seached my entire computer for um.zip and WebSite.zip with not luck.
Any help would be greatly appreciated as I am completely out of ideas.
Turns out this um.zip is somehow part of build but it is not getting created. Anyway, I was lucky enough to find a previous deployment package that was generated and I just manually built the new deployment package based off the old one. Deployed fine so I guess that is how I will proceed.

Why am I getting an Error 1309 : Error reading from file..... when attempting to use a .msi generated by InstallShield in VS 2013?

Error 1309 : Error reading from file.....
I am using VS2013 - with latest download of InstallShield Limited Edition
From VS2013 -> Solution Explorer -> Installshield Project -> Uninstall/Install: everything is fine.
If I run the installer file (right click .msi file->uninstall/install) from the directory it is compiled in everything is fine.
If I copy the .msi file anywhere else I get the above error UNLESS I copy the 'program files' directory that is also created in the DISK1 folder of installshield project.
I thought this was all supposed to be packaged into 1 file (isn't that the purpose of InstallShield?)
This question was originally posted on the flexera forum, but no one seems to be responding to questions on that forum:
https://community.flexerasoftware.com/showthread.php?214260-Error-1309-Error-reading-from-file
Any thoughts on how to fix this?
Thanks,
JB
I have solved it. When you have your InstallShield LE project ready to Build, Go into Build, Configuration Manager and change the build to SingleImage. Next do a Build. When you navigate the folders to where the CD_ROM folder is, you will see a new folder called SingleImage. As you go through that you will find the single MSI file that contains all folders. No more issues with Error 1309.
Hope that helps.
You should also ensure that the 254 character limit for the files' local url is not exceeded

Anyone else notice that $(SolutionDir) resolves to ProjectDir when loading Wix projects into Vs2010?

I'm using Vs2010 and Wix 3.6.0917.0, for the record. I use the $(SolutionDir) property quite a bit in my .wixproj file, since I only ever build the installer as part of a solution build or as part of a team build, and never by itself. However, while building from the command line works just fine (both from cmd on the desktop and when building on build agents), when I attempt to reload the .wixproj file into the IDE, I get errors because all the $(SolutionDir) variables are resolving to the project directory, not the solution directory. Consider:
C:\workspace\projectCollection\teamProject\branch\solution.sln
C:\workspace\projectCollection\teamProject\branch\source\installer\installer.wixproj
and assume a shared custom targets file:
C:\workspace\projectCollection\teamProject\branch\build\shared.targets
which is referenced inside installer.wixproj with:
<Import Project="$(SolutionDir)build\shared.targets">
Command line builds work fine...
C:\workspace\projectCollection\teamProject\branch\> MSBuild /t:build /property:Platform=x64;Configuration=Debug solution.sln
0 Errors
0 Warnings
Build succeeded!
But load into vs2010 and you see...
The imported project
"C:\workspace\projectCollection\teamProject\branch\source\installer\build\shared.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
C:\workspace\projectCollection\teamProject\branch\source\installer\installer.wixproj
You can see here that the resolved result of $(SolutionDir)build\shared.targets is getting the project directory and not the solution directory. What gives?
My guess would be that $(SolutionDir) resolves to nothing when the wixproj is being loaded into VS2010. In this case the imported file becomes "build\shared.targets". Since the path is relative it is assumed to be relative to the project directory. Using ".." or some other path could get you around the problem.
I verified this failed with WiX 3.5.2222.0 in VS2010. A C# console application project (csproj) worked as expected.
Have you filed a bug against WiX for this?
I looked at the WiX vs2010 addin code a little bit and the Solution properties are only created when doing a build and not when the project is loaded.

Resources