Errors while installing VS2015 tools for .NET Core 1.0 development - asp.net-core

I have difficulties updating my development machine to use the newest Visual Studio tools to support my development.
I did the following (VS2015 means Visual Studio 2015 Community Edition):
Uninstall my previous version of VS2015 Update 1. I should mention that I have installed various stuff on top of this such as AspNet5.ENU.RC1_Update1_KB3137909.exe and VWDOrVs2015AzurePack.exe (VS tools for Azure).
Restart
Install VS2015 using this file vs_community__55e913f53149d443afc7d14b09172fd9.exe. This ended with minor errors such as
[0EE0:0E48][2016-08-10T11:42:51]i301: Applying execute package: MobileServicesConnectedServices_VS, action: Install, path: C:\ProgramData\Package Cache{A4495E4F-5218-48FB-8AD2-F3076011B9E1}v14.0.23107\packages\MobileServicesConnectedServices\MobileServicesConnectedServices_VisualStudio14.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" NOVSUI="1"' [16DC:16E0][2016-08-10T11:42:58]i000: MUX: ExecuteError: Package (MobileServicesConnectedServices_VS) failed: Error Message Id: 1722 ErrorMessage: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
[0EE0:0E48][2016-08-10T11:42:58]e000: Error 0x80070643: Failed to install MSI package.
and
[0EE0:0E48][2016-08-10T11:42:45]i301: Applying execute package: AuthenticationConnectedServices_VS, action: Install, path: C:\ProgramData\Package Cache\{3FEAC561-1CF6-41D6-B0F3-BECDD9C88A1B}v14.0.23107\packages\AuthenticationConnectedServices\AuthenticationConnectedServices_VisualStudio14.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" NOVSUI="1"' [16DC:16E0][2016-08-10T11:42:50]i000: MUX: ExecuteError: Package (AuthenticationConnectedServices_VS) failed: Error Message Id: 1722 ErrorMessage: There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
[0EE0:0E48][2016-08-10T11:42:51]e000: Error 0x80070643: Failed to install MSI package.
Restart
Now, if I try to install the VS2015 Tools Preview from a file called DotNetCore.1.0.0-VS2015Tools.Preview2.exe I get this error:
Setup has detected that Visual Studio 2015 Update 3 may not be completely installed. Please repair Visual Studio 2015 Update 3, then install this product again.
and when I open the log file I see this:
[1B14:1A6C][2016-08-10T12:58:43]e000: Error 0x81f40001: Bundle condition evaluated to false: WixBundleInstalled OR NOT(((VS2015CommunityUpdateVersion <> VS2015UpdateVersion) AND (VS2015CommunityExists) AND (VS2015UpdateVersionExists)) OR ((VS2015ProfessionalUpdateVersion <> VS2015UpdateVersion) AND (VS2015ProfessionalExists) AND (VS2015UpdateVersionExists)) OR ((VS2015EnterpriseUpdateVersion <> VS2015UpdateVersion) AND (VS2015EnterpriseExists) AND (VS2015UpdateVersionExists)) OR ((VS2015WebExpressUpdateVersion <> VS2015UpdateVersion) AND (VS2015WebExpressExists) AND (VS2015UpdateVersionExists))) OR (SKIP_VSU_CHECK=1) OR (WixBundleAction=2)
I am now trying to install from scratch using a fresh Windows 10 installation to avoid problems related to side-effects from earlier installations.
I'm curious though to find out, what might cause these problems, and find out if I am doing something wrong.
Edit 2016-08-10: I have now verified that the same error occurs on a freshly installed Windows 10.

I found the solution after some more digging. It turns out many people faced this problem as described here:
(Click the Reviews tab):
https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935
After trying this from a command prompt:
DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1
the installation continues.

Above didn't work for me, nor did several other solutions I found online, but this finally worked:
Go to extensions folder, e.g. C:\Program Files (x86)\Microsoft
Visual Studio 14.0\Common7\IDE\Extensions
There will be a lot of cryptically named folders, e.g. "kehkjkd2.pme"
Open each folder to see if it is a nuget extension folder (if it contains ~40 files named nuget.*.dll)
If it is a nuget extension folder, delete it or move it to a backup folder.
Repeat - there may be multiple folders containing nuget.
After doing the above and rebooting (not sure if the reboot is necessary), the .NET Core 1.0.0 VS 2015 Tooling Preview 2 install worked.

Related

Osquery MsBuild error msb1009

While building the Windows environment for OsQuery (on my Windows 10 VM) from their website(link: https://osquery.readthedocs.io/en/stable/development/windows-provisioning/), I am getting the msb1009 error during the phase where I have to run the tools\make-win64-binaries.bat command. I get the following result after running that command:
CMake Error at CMakeLists.txt:402 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: VCTargetsPath.vcxproj
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Windows/System32/osquery/build/windows10/CMakeFiles/CMakeOutput.log".
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: osquery.sln
[-] osquery build failed.
I have been trying to make the osquery.sln file using that command and have looked online for solutions but without any success. Any help would be much appreciated!
Thanks in advance
Edit: Here is the output of running tools\make-win64-dev-env.bat and tools\make-win64-binaries.bat
tools\make-win64-dev-env.bat
tools\make-win64-dev-env.bat (contd..)
tools\make-win64-binaries.bat
Could you paste the full output of running the tools\make-win64-dev-env.bat and tools\make-win64-binaries.bat? Also have you tried closing out your shell and re-opening, or even worse -- reboot the system?
I ask because, as you note, it seems like the solution file never gets generated, which usually means there was either a missing dependency during provision, or some other issue when the script first ran. On first provision it's typically the case that a system reboot is needed, as Visual Studio community typically requires one. Further, we set a few shell environment variables that are leveraged during the build process, however those are supposed to be set at the end of the provisioning script.
Also feel free to hit us up in our Slack and check out the #windows channel :)
After a lot of code reading, researching online and trial and error, I found out that after a clean OS install, one would need to install git and then immediately clone the osquery repository on the user desktop rather than System32. This worked fine, at least for me. Just make sure to switch directories when opening command line with administrator mode.

Team city cannot copy pagefile.sys because it is being used by another process

I am trying to get TeamCity up and running for a CI / CD server. So far I have it connected to my Git repo, it pulls the repo and builds. Great.
Now I am trying to publish it. (My web server is also the CI server and agent).
I keep getting this error:
C:\TeamCity\buildAgent\work\f56e1490ff15a5c4\P4P.Web\P4P.Web.csproj(1373, 5): warning MSB3026: Could not copy "\pagefile.sys" to "C:\inetpub\wwwroot\P4P\build\pagefile.sys". Beginning retry 8 in 1000ms. The process cannot access the file '\pagefile.sys' because it is being used by another process.
It ultimately fails and fails the entire publish process.
C:\TeamCity\buildAgent\work\f56e1490ff15a5c4\P4P.Web\P4P.Web.csproj(1373, 5): error MSB3027: Could not copy "\pagefile.sys" to "C:\inetpub\wwwroot\P4P\build\pagefile.sys". Exceeded retry count of 10. Failed.
C:\TeamCity\buildAgent\work\f56e1490ff15a5c4\P4P.Web\P4P.Web.csproj(1373, 5): error MSB3021: Unable to copy file "\pagefile.sys" to "C:\inetpub\wwwroot\P4P\build\pagefile.sys". The process cannot access the file '\pagefile.sys' because it is being used by another process.
I found this ow SO. I tried downgrading the Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers packages to 1.0.0. I have even tried removing them entirely.
I have looked at all csproj files for references to these packages (including the package.config). Nothing.
I have no idea where to even begin to fix this.
My server is running Windows Server 2012 R2. I installed VS professional.
Any ideas?
I encountered the same issue.
The problem starts when you upgrade the DotNetCompilerPlatform to version 1.0.1.
To work around this issue you can downgrade to version 1.0.0 using the NuGet package manager.
EDIT: If you uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform AND Microsoft.Net.Compilers, and then install the DotNetCompilerPlatform (has a dependency on the Microsoft.Net.Compilers package so it will automatically install that) package again the error disappears for good so it seems.
Also check this issue link - error MSB3027: Could not copy "C:\pagefile.sys" to "bin\roslyn\pagefile.sys". Exceeded retry count of 10. Failed

WIX Installer Error: The system cannot open the device or specified file

I have a WIX installer that acts as a content installer for users. It's supposed to install these files in a specific directory. Unfortunately when I run it I get the following error: "The system cannot open the device or specified file." This then gives me error code 2755 after canceling the install (retry does not work).
I've looked through other questions with similar issues, and it does not appear to be an encryption problem on temp, the install folder, or the MSI installer itself - these all appear fine. This also isn't a problem with the C:\Windows\Installer folder being read-only.
I've never had a problem with a WIX installer before. What other things can I try to get this working?
For me the problem solved when the installer run as administrator.
I was seeing all of the following errors when installing my 3.5 GB .msi generated by WiX:
DEBUG: Error 2709: The specified Component name ('cmpF7216C180B7A7119CC61FDB3BD209D5D') not found in Component Table.
DEBUG: Error 2755: Server returned unexpected error 110 attempting to install package D:\...\setup.msi.
The system cannot open the device or specified file
Turning off EmbedCab made them all go away:
<Wix>...
<Product>...
<MediaTemplate EmbedCab="no" />
I unfortunately now have 30 cab files to deal with, but at least the install succeeds.

Got error "DIRCA_CheckFX. Return value 3." while unInstalling a program

I created an installer project for Win XP using VS 2013.
While trying to install it, I got an error:
"DIRCA_CheckFX. Return value 3."
I visited this article in StackOverFlow: DIRCA_CHECKFX Return Value 3 - VS 2013 Deployment Project.
I did the Suggestion that I read there - to replace the "dpca.dll" - and it works great !
But only at machines that I didn't install the bad msi before.
While trying to install the new version of msi on a machine that has the bad version, I got an error that this program is already installed.
But while trying to uninstall the program - I got the error of : "DIRCA_CheckFX. Return value 3."
My question Is - How to Unistall the bad Version Of my installer and prevent this error?
thanks.
The root cause of this is the perhaps silly choice to do a check for the .NET Runtime when uninstalling the product. I suppose it's possible that someone uninstalled the .NET FW and that you are running uninstall custom actions that require it, and maybe that happened to you, but it seems unnecessary to me IMO.
If I were to have this problem, there are two solutions:
If you have that exact same MSI file, same version, ProductCode, identical in every way, then open it with Orca and go to the InstallExecuteSequence table. Go to the DIRCA_CheckFX call and set a condition of False, save the MSI file. Then install that MSI file with a command line msiexec /i [path to new MSI] REINSTALL=ALL REINSTALLMODE=vomus and this will do an update in place of the installed product, including the call to DIRCA_CheckFX that is now suppressed. Uninstall should work.
In the absence of the proper MSI file, troll through the Windows\installer folder looking at the cached MSI files. Hovering the mouse over each should get you to your cached MSI for the broken product. Again, edit with Orca as above to suppress the call on DIRCA_CheckFX.

Building .NET project with xbuild on Linux environment

I have very simple project that created with Visual Studio 2013, using Nancy Asp.Net Web Application template.
In my development machine, it is building by Visual Studio 2013 successfully.
But when I try to build same sources on Linux Mono environment with xbuild, it is failing.
Here is the output:
root#jannes:/home/hitly/hitly/src/Hitly.Service# xbuild
XBuild Engine Version 12.0
Mono, Version 3.2.8.0
Copyright (C) 2005-2013 Various Mono authors
Build started 3/31/2014 2:11:49 PM.
__________________________________________________
Project "/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj" (default target(s)):
Target RestorePackages:
Executing: mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"
The specified path is not of a legal form (empty). /home/hitly/hitly/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"' exited with code: 1.
Task "Exec" execution -- FAILED
Done building target "RestorePackages" in project "/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj".-- FAILED
Done building project
"/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj".-- FAILED
Build FAILED. Errors:
/home/hitly/hitly/src/Hitly.Service/Hitly.Service.csproj (default targets) -> /home/hitly/hitly/src/.nuget/NuGet.targets
(RestorePackages target) ->
/home/hitly/hitly/src/.nuget/NuGet.targets: error : Command 'mono --runtime=v4.0.30319 ../.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "../"' exited with code: 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.7254640
I couldn't understand reason of the error.
How can I build these sources on Linux?
Fixed!
I simply added PackagesConfig element to .nuget/NuGet.targets:
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
++++<PackagesConfig>packages.config</PackagesConfig>
</PropertyGroup>
NuGet.targets is a key file for NuGet package restore, but its versions are not well managed by NuGet guys.
The issue you met simply indicates that the version you use is not Mono friendly. Your edit might work, but I recommend you keep an eye on NuGet Git repository to grab the latest, such as http://nuget.codeplex.com/SourceControl/latest#src/Build/NuGet.targets.
Hope NuGet guys can do more testing on Mono as that can prevent similar issues in the long run.
(Please forget about this answer. NuGet latest console can run on latest Mono and the restore mechanism is also changed to get rid of this targets file.)