Whenever I load a solution in Visual Studio with a specific project set as the startup project, I get a VSHost32.exe crash. If I keep on going and launch the application, I get a COMException:
{"Invalid value for registry (Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE))"}
With a stacktrace:
at System.Runtime.InteropServices.RuntimeEnvironment.GetDeveloperPath()
at System.AppDomain.SetupFusionStore(AppDomainSetup info)
at System.AppDomain.SetupDomain(Boolean allowRedirects, String path, String configFile)
This can occur when a project's config file has developmentMode set, but the machine doesn't have a devPath set.
<runtime>
<developmentMode developerInstallation="true"/>
</runtime>
Removing that will fix it up.
Navigate to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config and remove the below setting from your machine config
<developmentModedeveloperinstallation=”true”/>
Related
I'm getting the same error message as in this question: Could not load type 'Microsoft.Cct.Services.Sqm.IWatSqmService' Unfortunately, I cannot upgrade to Azure SDK 2.9, as the top answer there suggests.
Specifically, I get this error in a message box whenever I try to package my Azure Cloud Service project:
What's interesting is that I can start the same project in the emulator, which I would assume involves packaging it.
Things I've tried:
Ensuring that I only have version 2.8.2 of the emulator installed (I may have had 2.9 installed initially)
Reinstalling version 2.8.2 of the SDK
Manually copying the Windows Azure Tools from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 to the v14.0 equivalent.
Ensuring that C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.8 exists
Reinstalling Visual Studio (so you know I'm desperate!)
And I've no idea what to try next. I can't work out which DLL is supposed to hold the Microsoft.VisualStudio.WindowsAzure.Services assembly, I can't find any references in any config files, and all the Google hits seem to point back to the SO question linked above.
What's going on? And how can I fix it?
In case I'm being an idiot, here's all the Azure-related things I've got installed:
Also (just in case it's relevant) I'm on Windows 7 SP1.
Update 17/01/16
Following some advice from the excellent Rest Azured Slack channel, I've tried using ProcMon and Fusion Log to diagnose this (spoiler: without success)
ProcMon filtered to that assembly returns nothing:
Fusion log (set to log everything) yields lots of entries like this:
* Assembly Binder Log Entry (17/01/2017 # 11:52:02) *
The operation was successful. Bind result: hr = 0x0. The operation
completed successfully.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under
executable C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\devenv.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Microsoft.VisualStudio.WindowsAzure.Services, Version=1.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio
14.0/Common7/IDE/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = devenv.exe Calling assembly
: Microsoft.VisualStudio.WindowsAzure, Version=2.9.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
=== WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with
Assembly.Load(). WRN: No matching native image found. LOG: IL assembly
loaded from C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\Extensions\Microsoft\Windows Azure Tools\Microsoft.VisualStudio.WindowsAzure.Services.dll.
When I explore the DLL mentioned, I can find Microsoft.Cct.Services.Sqm, but it doesn't contain a type IWatSqlService:
This feels like it's the crux of the issue, but I've no idea what to do next. Presumably I'd need to replace the DLL with a version that does define IWatSqlService, but I'm not sure where I'd get one. Or, for that matter, why it would even be necessary.
Next stop is probably a full wipe of the machine.
I've had the same problem, and solved it by not using the Web Platform Installer.
Download all parts (Microsoft Azure SDK for .NET - 2.8.2) from the Microsoft site: https://www.microsoft.com/en-us/download/details.aspx?id=50041 and follow the instructions how to install them.
For anyone else with this problem. I ended up resolving this by nuking it from orbit. Fresh install of Windows, reinstall VS and the SDK.
Confusingly, you can also see this error when you add a new
<setting name="TODO" />
element to your *.csdef file but either:
forget to add the corresponding <setting name="TODO" value="TODO" /> element to every *.cscfg file, or
accidentally add a duplicate <setting name="TODO" value="TODO" /> element to any of the *.cscfg files.
This is a super weird question for Visual Studio 2013: Windows Forms Application 3.5!
I designed and made the program, then I ran the program for the first time and an error pops up.
And then I click cancel, retry and this time I click yes and this pops up:
Error while trying to run project: Could not load file or assembly
'SourceProject' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference.(Exception
from HRESULT: 0x80131040)
Any ideas on fixing it?
FULL ERROR LOG
Error 1 Unable to copy file "obj\Debug\SOURCEPROJECT.exe" to
"bin\Debug\SOURCEPROJECT.exe". Access to the path
'obj\Debug\SOURCEPROJECT.exe' is denied. SOURCEPROJECT
Just open your Debug Configuration near by Application Run Button in VS. Then , Choose debug with Any CPU to x64 or x86 .. May be it will help someone.
Thanks,
I have a funny problem on my machine
Windows 7 x64, using QT 5.2 for the GUI
I'm not able to start the app I always receive the error
First I thought I had a broken dll, so through some trial and error I found a solution:
I add the QT5Core.dll via enviroment path, and NOT directly to the app folder. Then the programm works. If I copy the dll back to the app Folder, Same problem as before!?!?!?1
I'm really confused, because the error only occurs on my machine?
Debugging doesn't really help,
In code, the error occures here:
MyApplication::MYApplication(int argc, char** argv, int version)
: QApplication(argc, argv, version) // <<< this call fails!
{ }
somebody can help me?
Why is the location of the qt5core.dll a problem?!?!?
UPDATE
I used the profiling function of depends and found the following behaviour:
Failing
GetProcAddress(0x76800000 [c:\windows\syswow64\KERNEL32.DLL], "CreateSymbolicLinkW") called from > "dirone\xxxx.EXE" at address 0x00FF2877 and returned 0x7688CCE9.
First chance exception 0xE06D7363 (Microsoft C++ Exception) occurred in "c:\windows\syswow64\KERNELBASE.DLL" at address 0x765CC41F.
Exception: "bad allocation"
Working
LoadLibraryW("C:\BuildPackages\QT\plugins\platforms\qwindows.dll") called from "dirtwo\QT5CORE.DLL" at address 0x66AA5154.
Loaded "c:\buildpackages\qt\plugins\platforms\QWINDOWS.DLL" at address
0x0F380000. Successfully hooked module.
somehow the path to the qwindows.dll is hardcoded into the dll (there is no environment path to this directory)
If I rename the qwindows.dll or delete it, startup failes again.
BUT the qwindows.dll is bundeld with our product. It is in a subdirectory ./platforms/
AND the files are the same (diff returns equal)
Somebody have some clue what I should try next?
Check if you already have some qt related environmental variables.
Crashes are usually due to this, remove those envronmental variables first. Check whether you have any other qt installed libraries.
it would be better if you can post the cal stacks.
Some other dlls are needed that reside in the directory of the qt5core.dll. When you add this path to the search path the dlls are found. When you simply copy the dll these dlls can not be found. You can check dependencies with the depends tool.
Candidates for the additional dlls are:
icuin51.dll and icuuc51.dll
Found the Problem:
The enviromentvariable:
QT_QPA_PLATFORM_PLUGIN_PATH=C:\BuildPackages\QT\plugins\platforms
was set to the path. If removing this variable, everything works as it should!
I have associated some test cases with unit tests in a project. That project is build and copied to a drop location on a share. When I go to run these tests I'm getting a lot of failures due to System.DllNotFoundExceptions from an unmanaged DLL that is included as part of these tests?
Does anyone know why this is happening? I have a lab environment setup and the tests are (supposedly) running on that machine. What is the workflow for when these tests run? Does the TestController copy the unit test DLLs somewhere locally on the machine in the lab environment or is it trying to run directly from the build folder?
Here is the stack trace for the error. Note that c:\Builds\ is NOT on the test machine which seems quite suspect to me.
Test method OutputProcessing.Integration.PanaceaOutputG1.ReactorCoreSimulationResults threw exception:
System.DllNotFoundException: Unable to load DLL 'ge.gnf.cedar06.c.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Gnf.Cedar.NativeMethods.ATACHF(Int32& fileCode, String fileName, Int32& openMode, Int32[] stat)
Gnf.Cedar.ManagedMethods.Atachf(String fileName, FileAccess access, Int32[] stat)
Gnf.Cedar.Cypress.CedarFile.OpenCedarFile(String path, FileAccess access, FileSizeHint hint, AuditMode auditMode, ChainingOrderOption chainingOrder, Boolean createIfMissing)
Gnf.Cedar.Cypress.CedarFile..ctor(String path, FileMode mode, FileAccess access, FileSizeHint hint, AuditMode auditMode, ChainingOrderOption chainingOrder)
Gnf.Cedar.Cypress.CedarFile..ctor(String path, FileMode mode, FileAccess access)
GE.GNF.Acumen.Cedar.DataAccess.CedarRepository.GetCedarFile() in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Cedar\Cedar.DataAccess\CedarRepository.cs: line 67
GE.GNF.Acumen.Cedar.DataAccess.CedarRepository..ctor(String fullFilePath) in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Cedar\Cedar.DataAccess\CedarRepository.cs: line 40
GE.GNF.Acumen.Cedar.DataAccess.CedarRepository..ctor(String fullFilePath, String qualifier) in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Cedar\Cedar.DataAccess\CedarRepository.cs: line 43
OutputProcessing.Integration.PanaceaOutputG1.ReactorCoreSimulationResults() in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Auto Integration Tests\OutputProcessing.Integration\PanaceaOutputG1.cs: line 58
The DLLs containing test implementation will be copied to the test machine.
You can activate Test Agent logs and check in the log file which files have been deployed.
To activate these logs:
Go to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE folder
(this is the path for Test Agent 2012, if you are using older version the path with be slightly
different).
Change file QTAgentService.exe.config (set the EqtTraceLevel to "4" and CreateTraceListener to "yes"):
<configuration>
<system.diagnostics>
<switches>
<!-- You must use integral values for "value".
Use 0 for off, 1 for error, 2 for warn, 3 for info, and 4 for verbose. -->
<add name="EqtTraceLevel" value="4" />
</switches>
</system.diagnostics>
<appSettings>
<add key="CreateTraceListener" value="yes"/>
</appSettings>
</configuration>
Restart Test Agent and you will find the file VSTTAgent.log created in the same directory.
Start your tests now and then check this logfile. You will find entries like this one (just search for "Copying remote file":
I, 5856, 4, 2014/01/31, 09:50:58.283, <computer name>\QTAgentService.exe, Copying remote file: C:\Users\<tfs build user>\AppData\Local\VSEQT\QTController\<test run>\Deployment\<your DLL file> to: C:\Users\<local user>\AppData\Local\VSEQT\QTAgent\<test run>\<test configuration>\Deployment\<your DLL file>
Now you can check if all your DLLs have been deployed.
Note: The source path is located on the machine Test Controller is running on, the destination path is located on the test machine (where Test Agent is running).
As much as I know unmanaged DLLs will not be deployed along with "unit tests DLLs" so you will have to make sure they will be deployed.
You can do it using Test Settings:
My VS2010 database deploy is failing on my build server, which has SQL Server 2008 R2 installed on it. Here's the output that's relevant:
Creating Acme.Database...
D:\TeamCity\BuildAgent\Work\da2fc5ebd5805d44\src\Acme.Database\sql\Acme.Database.sql(30,0): Error SQL01268: .Net SqlClient Data Provider: Msg 5133, Level 16, State 1, Line 1 Directory lookup for the file "C:\Program Files\Microsoft SQL Server**MSSQL10.MSSQLSERVER**\MSSQL\DATA\Acme_Database_log.ldf" failed with the operating system error 3(The system cannot find the path specified.).
D:\TeamCity\BuildAgent\Work\da2fc5ebd5805d44\src\Acme.Database\sql\Acme.Database.sql(30,0): Error SQL01268: .Net SqlClient Data Provider: Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
An error occurred while the batch was being executed.
The actual path is here:
C:\Program Files\Microsoft SQL Server**MSSQL10_50.MSSQLSERVER**\MSSQL\DATA\Acme_Database.mdf
The only reference to the path I could find in the database project was in the root folder, a file called:
PRIMARY.Acme_Database.sqlfile.sql
It includes an ALTER DATABASE statement that I changed to use the _50 path, but this did not fix the issue.
I'm not sure why the db project needs to know where the actual database MDF file is located in any case - I would have thought it could just connect to it vis TSQL, but in any case I can't get the project to deploy with this error and would appreciate any help.
Turns out if you specify a "file" in Schema Objects\Database Level Objects\Storage\Files (use Add Item, File) the values specified in the path override those looked up from the Server. If you must specify them use the variables from sqlcmdvariables $(DefaultdataPath)$(Databasename) to fill things out.
Take a look at the default file path on the server itself.
Screencast: http://screencast.com/t/OWM5ODFjZj
The fact that you don't have a path specified could likely be the issue.
[Update]
The reason I suggest this is that during the creation of the deployment script, if you have not specified the settings in the Project Settings -> Deployment tab, the DefaultDataPath is looked up from the target server's path.
I don't know anything about TeamCity really so this may be a stupid question, but how are you doing the deployment? It looks like the MSBuild deploy task for a DB project can take a property that gives the data path:
http://www.codewrecks.com/blog/index.php/2009/10/06/deploy-a-database-project-with-tfs-build/
Can you set the path that way?
I had the same error, but a different solution.
For me everything was correct (as far as I can tell), but the generated deploy script set the path variables before the databasename variable - resulting in a reference to a variable that did not exist. I updated Database.sqlcmdvars to hardcode the database name value - not best practice, but a sufficient workaround for my needs.