Keep getting warning MSB3245 on dotnet build - build

I keep getting this error when i try to use Azure Pipelines.
I am running this on the Hosted VS2017 pool.
Here is the pipeline i constructed:
The error i keep getting is displayed in the following logs:
2019-04-30T12:13:03.1506572Z =============================================================================
2019-04-30T12:13:03.1506616Z Task : .NET Core
2019-04-30T12:13:03.1506659Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
2019-04-30T12:13:03.1506705Z Version : 2.150.1
2019-04-30T12:13:03.1506734Z Author : Microsoft Corporation
2019-04-30T12:13:03.1506782Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2019-04-30T12:13:03.1506811Z ==============================================================================
2019-04-30T12:13:03.7965121Z [command]C:\windows\system32\chcp.com 65001
2019-04-30T12:13:03.8059420Z Active code page: 65001
2019-04-30T12:13:03.8489997Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\SLDatatHighway.Tests\SLDatatHighway.Tests.csproj
2019-04-30T12:13:04.1500736Z Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
2019-04-30T12:13:04.1501599Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-04-30T12:13:04.1501793Z
2019-04-30T12:13:04.8585498Z Restoring packages for D:\a\1\s\SLDatatHighway.Tests\SLDatatHighway.Tests.csproj...
2019-04-30T12:13:05.0444966Z Restore completed in 185.75 ms for D:\a\1\s\SLDatatHighway.Tests\SLDatatHighway.Tests.csproj.
2019-04-30T12:13:07.0489863Z SLDatatHighway.Tests -> D:\a\1\s\SLDatatHighway.Tests\bin\Debug\netstandard2.0\SLDatatHighway.Tests.dll
2019-04-30T12:13:07.0572034Z
2019-04-30T12:13:07.0572433Z Build succeeded.
2019-04-30T12:13:07.0572907Z 0 Warning(s)
2019-04-30T12:13:07.0573263Z 0 Error(s)
2019-04-30T12:13:07.0573380Z
2019-04-30T12:13:07.0573422Z Time Elapsed 00:00:02.84
2019-04-30T12:13:07.0915364Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\SL_DataHighway.Tests\SL_DataHighway.Tests.csproj
2019-04-30T12:13:07.3764095Z Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
2019-04-30T12:13:07.3807448Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-04-30T12:13:07.3807518Z
2019-04-30T12:13:08.1015074Z Restoring packages for D:\a\1\s\SL_DataHighway.Tests\SL_DataHighway.Tests.csproj...
2019-04-30T12:13:08.7878736Z Restore completed in 484.69 ms for D:\a\1\s\SL_DataHighway.Tests\SL_DataHighway.Tests.csproj.
2019-04-30T12:13:14.0395526Z SL_DataHighway.Tests -> D:\a\1\s\SL_DataHighway.Tests\bin\Debug\netcoreapp2.1\SL_DataHighway.Tests.dll
2019-04-30T12:13:14.0481411Z
2019-04-30T12:13:14.0482045Z Build succeeded.
2019-04-30T12:13:14.0483401Z 0 Warning(s)
2019-04-30T12:13:14.0483487Z 0 Error(s)
2019-04-30T12:13:14.0483908Z
2019-04-30T12:13:14.0484034Z Time Elapsed 00:00:06.60
2019-04-30T12:13:14.0864499Z [command]"C:\Program Files\dotnet\dotnet.exe" build D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj
2019-04-30T12:13:14.3705111Z Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
2019-04-30T12:13:14.3705588Z Copyright (C) Microsoft Corporation. All rights reserved.
2019-04-30T12:13:14.3705720Z
2019-04-30T12:13:14.8626284Z Nothing to do. None of the projects specified contain packages to restore.
2019-04-30T12:13:15.3736897Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.3779682Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4465770Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2729,5): error MSB4062: The "Microsoft.Build.Tasks.ResolveComReference" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4550056Z
2019-04-30T12:13:15.4554234Z Build FAILED.
2019-04-30T12:13:15.4554556Z
2019-04-30T12:13:15.4574427Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4579425Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4580177Z C:\Program Files\dotnet\sdk\2.2.105\Microsoft.Common.CurrentVersion.targets(2729,5): error MSB4062: The "Microsoft.Build.Tasks.ResolveComReference" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj]
2019-04-30T12:13:15.4583312Z 2 Warning(s)
2019-04-30T12:13:15.4583865Z 1 Error(s)
2019-04-30T12:13:15.4585281Z
2019-04-30T12:13:15.4585654Z Time Elapsed 00:00:01.01
2019-04-30T12:13:15.4950879Z ##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
2019-04-30T12:13:15.4960391Z ##[error]Dotnet command failed with non-zero exit code on the following projects : D:\a\1\s\SL_Data_Highway_App\SL_Data_Highway_App.csproj
2019-04-30T12:13:15.4994396Z ##[section]Finishing: dotnet build
2019-04-30T12:13:15.5009622Z ##[section]Starting: Checkout
2019-04-30T12:13:15.5109587Z ==============================================================================
2019-04-30T12:13:15.5109634Z Task : Get sources
2019-04-30T12:13:15.5109671Z Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2019-04-30T12:13:15.5109870Z Version : 1.0.0
2019-04-30T12:13:15.5109906Z Author : Microsoft
2019-04-30T12:13:15.5109940Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2019-04-30T12:13:15.5109992Z ==============================================================================
2019-04-30T12:13:15.9176300Z Cleaning any cached credential from repository: SL-DataHighway (Git)
2019-04-30T12:13:15.9266683Z ##[section]Finishing: Checkout
2019-04-30T12:13:15.9371889Z ##[section]Starting: Finalize Job
2019-04-30T12:13:15.9414810Z Start cleaning up orphan processes.
2019-04-30T12:13:15.9425504Z ##[section]Finishing: Finalize Job
2019-04-30T12:13:15.9475730Z ##[section]Finishing: Job
Building via Visual Studio 2017 works fine. Problem is only when I try to build via an Azure Pipeline.
Is there something I am missing or did I import something wrong?
Here is an overview of the references in my project. As you can see the Outlook Interop is referenced fine as well as the Office reference.
My packages.config file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Office.Interop.Outlook" version="15.0.4797.1003" targetFramework="net461" />
</packages>
Thank you in advance!
EDIT: Added pool, Added overview of packages.config

Related

v8.5 - Error Compiling Parallel Transformer

I would appreciate if i can get some help in solving this issue for which i have been looking for information for over 2 days through various forums. Crying or Very sad Crying or Very sad
I have installed Infosphere Datastage v8.5 on windows environment for testing and have run a couple of jobs, but when i run a job containing a transformer i get compilation error.
Job: Row generator -> Tfx -> Sequential File
Based on my search through various forums i find that Similar issue has been faced by others as well.But i am unable to find a concrete answer regarding the following:
1. A Compiler that i need to install and the related SDK that needs to be installed along with it
2. or A combined pack that has both compiler+SDK
The Installation Guide talks about Microsoft Visual Studio .NET 2008 Express Edition C++: but does not mention which is the associated SDK that needs to be installed ?
or is there a newer version of C++ compiler+SDK that will work on my environment
My Environment Details:
OS - Windows Server 2008 R2(Standard) SP1 - 64 bit
IIS - Infosphere Information Server v8.5 64bit Multilingual
--================
.Net framework
--================
Microsoft .Net framework 1.1
Microsoft .Net framework 4 Client Profile
Microsoft .Net framework 4 Extended
--=====
SDK
--=====
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
This SDK created 2 directories path , which are as follows:
C:\Program Files\Microsoft SDKs
C:\Program Files (x86)\Microsoft Visual Studio 9.0
Windows Environment Variables:
INCLUDE - C:\IBM\SQLLIB\INCLUDE;C:\IBM\SQLLIB\LIB;C:\Program Files\Microsoft SDKs\Windows\v7.0\Include
LIB - C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib;C:\IBM\SQLLIB\LIB
CLASSPATH - .;C:\IBM\SQLLIB\java\db2java.zip;C:\IBM\SQLLIB\java\db2jcc.jar;C:\IBM\SQLLIB\java\sqlj.zip;
C:\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\IBM\SQLLIB\bin;C:\IBM\SQLLIB\java\common.jar
Path - C:\IBM\InformationServer\Server\DSComponents\bin;C:\Program Files (x86)\MKS Toolkit\mksnt;C:\PROGRA~2\MKSTOO~1\bin64;C:\PROGRA~2\MKSTOO~1\bin;
C:\PROGRA~2\MKSTOO~1\bin\X11;C:\PROGRA~2\MKSTOO~1\mksnt;C:\IBM\InformationServer\ASBNode\apps\jre\bin\classic;C:\IBM\InformationServer\ASBNode\lib\cpp;
C:\IBM\InformationServer\ASBNode\apps\proxy\cpp\vc60\MT_dll\bin;%systemroot%\system32;%systemroot%;
%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;c:\program files (x86)\microsoft visual studio 9.0\vc\bin;
c:\program files (x86)\microsoft visual studio 9.0\common7\ide;c:\program files\ibm\gsk8\lib64;C:\IBM\SQLLIB\BIN;C:\IBM\SQLLIB\FUNCTION;
C:\IBM\SQLLIB\SAMPLES\REPL;C:\Windows/SysWOW64
Compiler information from windows command prompt:
c:\Users\skh>cl.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
Datastage Environment Variables:
APT_COMPILEOPT (old): -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c -W/Zc:wchar_t-
APT_COMPILEOPT (new): -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c
APT_LINKOPT(old): -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-
APT_LINKOPT(new): -s -W/dll -W/base:0x50000000
The (old) represent the default values that DS Environment variables had. I ran my job which had a transformer but i got the compilation error.
I changed the Environment variable values to what is stated in (new), still i get the compilation error mentioned below
Output from transformer compilation follows:
I IIS-DSEE-TFCN-00001 12:55:36(000)
IBM WebSphere DataStage Enterprise Edition 8.5.0.5746
Copyright (c) 2001, 2005-2008 IBM Corporation. All rights reserved
##I IIS-DSEE-TFCN-00006 12:55:36(001) <main_program> conductor uname: -s=Windows_NT; -r=1; -v=6; -n=IN-MUM-IBMQLT; -m=Pentium
##I IIS-DSEE-TOSH-00002 12:55:36(002) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 12:55:36(003) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 12:55:36(004) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 12:55:36(007) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##E IIS-DSEE-TBLD-00076 12:55:39(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 256.
##E IIS-DSEE-TFSR-00019 12:55:39(001) <main_program> Could not check all operators because of previous error(s)
##W IIS-DSEE-TFTM-00012 12:55:39(002) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##I IIS-DSEE-TBLD-00000 12:55:39(003) <main_program> Error when checking composite operator: Output from subprocess: cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
cl : Command line warning D9025 : overriding '/GX' with '/EHa'
##I IIS-DSEE-TBLD-00000 12:55:39(004) <main_program> Error when checking composite operator: Output from subprocess: C:\IBM\InformationServer\Server\PXEngine\include\apt_util/ints.h(83) : fatal error C1083: Cannot open include file: 'strstream': No such file or directory
##W IIS-DSEE-TFEV-00025 12:55:39(005) <transform> Error when checking composite operator: Converting string to number.
##W IIS-DSEE-TFEV-00023 12:55:39(006) <transform> Error when checking composite operator: Implicit conversion from source type "String" to result type "DFloat".
##W IIS-DSEE-TFEV-00025 12:55:39(007) <transform> Error when checking composite operator: Converting number to string.
##W IIS-DSEE-TFEV-00023 12:55:39(008) <transform> Error when checking composite operator: Implicit conversion from source type "DFloat" to result type "String".
##W IIS-DSEE-TBLD-00000 12:55:39(009) <main_program> Error when checking composite operator: Output from subprocess: ld: script execution error in file 'C:/PROGRA~2/MKSTOO~1/etc/nutccg/ld.ccg' on line 1119
>>> execv: could not run 'link32': The system cannot find the file specified.
##I IIS-DSEE-TBLD-00079 12:55:39(010) <transform> Error when checking composite operator: cxx -LC:/IBM/InformationServer/Server/Projects/PRJ_QSPOC/RT_BP2.O/ -LC:/IBM/InformationServer/Server/PXEngine/lib -LC:/IBM/InformationServer/Server/PXEngine/user_lib -s -W/dll -W/base:0x50000000 -lliborchnt -lliborchcorent -lliborchbuildopnt C:/IBM/InformationServer/Server/Projects/PRJ_QSPOC/RT_BP2.O/V0S3_TestJob_Tfx_Transformer.tmp.o -o C:/IBM/InformationServer/Server/Projects/PRJ_QSPOC/RT_BP2.O/V0S3_TestJob_Tfx_Transformer.dll.
##E IIS-DSEE-TCOS-00029 12:55:39(011) <main_program> Creation of a step finished with status = FAILED. (TestJob_Tfx.Transformer)
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S3_TestJob_Tfx_Transformer transform operator.
0003: //
0004:
0005: // define our input/output link names
0006: inputname 0 DSLink2;
0007: outputname 0 DSLink5;
0008:
0009: initialize {
0010: // define our control variables
0011: int8 RowRejected0;
0012: int8 NullSetVar0;
0013:
0014: }
0015:
0016: mainloop {
0017:
0018: // declare our intermediate variables for this section
0019: dfloat InterVar0_0;
0020:
0021: // initialise the rejected row variable
0022: RowRejected0 = 1;
0023:
0024: // evaluate columns (no constraints) for link: DSLink5
0025: InterVar0_0 = DSLink2.Dummy1;
0026: DSLink5.Dummy1 = (InterVar0_0 + 5);
0027: writerecord 0;
0028: RowRejected0 = 0;
0029: }
0030:
0031: finish {
0032: }
0033:
*** End of Internal Generated Transformer Code
This is how i went about fixing it. I hope this helps people facing similar problems and saves some time and effort.
so , here it goes :
I installed Visual Studio C++ 2008 Express Edition.
I then worked around vcvarsall.bat file .if you are wondering why , please check
(
http://msdn.microsoft.com/en-us/library/x4d2c09s(v=vs.80).aspx )
and
Errors while building/installing C module for Python 2.7
)
I executed the following from the cmd window, to set the 64 bit compiler:
vcvarsall.bat amd64
NOTE: my environment has a X64 AMD chipset windows server;I used echo %PROCESSOR_ARCHITECTURE% , from cmd window to determine this.
To cross check which compiler is set, execute the following and the output would indicate.
cl.exe
Next , set the following windows system variables:
INCLUDE - C:\IBM\SQLLIB\INCLUDE;C:\IBM\SQLLIB\LIB; C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
LIB - C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib ;C:\IBM\SQLLIB\LIB
Note:-
The folder path C:\Program Files\Microsoft SDKs\Windows\v6.0A is created by the Visual Studio C++ 2008 Express Edition. This should be the source for folder paths that are set for INCLUDE & LIB
There is a similar path that the SDK creates C:\Program Files\Microsoft SDKs\Windows\v7.0\ , but Include and Lib folder from this path should not be used to set the above mentioned Windows Environment variables , I made this mistake during my set up :(
for reference please check the Release Note of the SDK that is to be installed.
Set the following Datastage ENV variable,from the Administrator, to values below.
APT_COMPILEOPT : -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c -W/Zc:wchar_t-
APT_LINKOPT : -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-
I then restarted the Datastage services.
.. and the transformers started to work :)
PS : I did not uninstall Information Server nor the SDK (which i initially presumed was the problem)

Executing coded UI test from a target machine's mstest(standalone). Dll's/Files needed!! :(

i set up mstest on target machine as standalone program without installing visual studio. So i copied the files(*.exe's,dll's) mstest needed to the target machine and register all dlls in gac which mstest needs to run unit tests.
Works fine so far for normal unit tests.
Acually i try to setup mstest to run coded ui test. I copied some new dll's to the target machine:
- Microsoft.VisualStudio.QualityTools.CodedUITestFramework.dll
- Microsoft.VisualStudio.TestTools.UITest.Common.dll,TestTools.UITest.Extensions.dll
- Microsoft.VisualStudio.TestTools.UITesting.dll
- Microsoft.VisualStudio.HostingProcess.Utilities.Sync
But when i try to execute a test on cmd.exe via mstest.exe on my target machine, the test will run but always fail (works fine on my local machine, Visual Studio 2012). Its a pretty simple test:
- just click on "Start",
- type in "calc press enter"
Both machines use the same operating system.
I guess MSTest.exe still needs some dll's to perform codedUiTests. The bad thing is the missing dll's arent show up in cmd.exe, no errors, no hints just nothing :/
The test runs like normal but will fail all tests.
cmd-output:
Microsoft (R) Test Execution Command Line Tool Version 11.0.50727.1
Copyright (c) Microsoft Corporation. All rights reserved.
Loading D:\Users\Jenkins\Desktop\CodedUITestProject1\CodedUITestProject1\bin\Debug\CodedUITestProject1.dll...
Starting execution...
Results Top Level Tests
------- ---------------
Failed CodedUITestProject1.CodedUITest1.CodedUITestMethod1
0/1 test(s) Passed, 1 Failed
Summary
-------
Test Run Failed.
Failed 1
---------
Total 1
Results file: C:\VS2011Stub\Common7\IDE\TestResults\Jenkins_MSGP166C 2013-05-24 12_36_28.trx
Test Settings: Default Test Settings
Does anyone know what files mstest.exe needs to run codeduitests in a correct way?
Edit: I checked the *.trx file and copied the missing dll's to my target machine.
I tried to run the test again, it failed again. I was checking the trx file again and got an awesome message :/
<Results>
<UnitTestResult executionId="4652eeb1-e1b4-4782-a288-dbd4bb0bda5a" testId="484ddbfe-fdc6-0f5d-9e7b-bab4da5b5905" testName="CodedUITestMethod1" computerName="MSGP166C" duration="00:00:00.0887388" startTime="2013-05-24T16:30:24.1716290+02:00" endTime="2013-05-24T16:30:24.6266745+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="4652eeb1-e1b4-4782-a288-dbd4bb0bda5a">
<Output>
<ErrorInfo>
<Message>Error calling Initialization method for test class CodedUITestProject1.CodedUITest1: System.IO.FileNotFoundException: Das System kann die angegebene Datei nicht finden. (Ausnahme von HRESULT: 0x80070002)</Message>
<StackTrace> bei System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
bei System.Reflection.Assembly.LoadFile(String path)
bei Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssembly(String assemblyFile)
</StackTrace>
</ErrorInfo>
</Output>
</UnitTestResult>
</Results>
So what Assembly is missing now?? It was not mentioned.
Thanks in Advance
Instead of trying to copy over the dlls I would install VS Test Agents. It's much lighter than visual studio and will get you mstest. This is the approach I use when running CodedUI tests on a test machine.
http://search.microsoft.com/en-us/DownloadResults.aspx?q=test+agents
Download the version of test agents that you built the project in.
(doesn't really matter)
There will be 3 options when you open the installer. You want test agents.
You should now have everything you need for mstest and codedui
Another that works well is putting all of your codedui tests into an ordered test and passing that into mstest.
MSTest /TestContainer:OrderedTest1.orderedtest
should do the trick

Running native VS2012/C++ 64-bit unit tests from command line

I'm attempting to run unit tests from the command line. I tried using the mstest.exe program using the following command:
E:\VS Projects\...\>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\
Common7\IDE\MSTest.exe" /testcontainer:mytest.dll
/testsettings:"E:\VS Projects\...\Local.testsettings"
The mstest program responce was:
Microsoft (R) Test Execution Command Line Tool Version 11.0.50727.1
Copyright (c) Microsoft Corporation. All rights reserved.
Loading E:\VS Projects\...\Local.testsettings...
Loading mytest.dll...
mytest.dll
Unable to load the test container 'mytest.dll' or one of its
dependencies. If you build your test project assembly as a 64 bit assembly,
it cannot be loaded. When you build your test project assembly, select "Any
CPU" for the platform. To run your tests in 64 bit mode on a 64 bit
processor, you must change your test settings in the Hosts tab to run your
tests in a 32 bit process. Error details: Could not load file or assembly
'file:///E:\VS Projects\...\mytest.dll' or one of its dependencies. The
module was expected to contain an assembly manifest.
Local.testsettings does include information, that the tests shall be run in 64-bit environment.
I can guess, that mstest expects an assembly instead of native test project and this is why it fails. If so, how can I run native tests from the command line? In the other case, how shall I configure the mstest to work properly?
Thanks for Hans Passant for guidance.
The solution is to use:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
Another option is to install Catch2 which allows you to run the unit testing project as an exe from the command prompt and display the results:
https://github.com/catchorg/Catch2
C:\Projects\T9Predict\T9PredictTests\Debug\> T2PredictTests.exe
T2PredictTests.exe
C:\Projects\T9Predict\T9PredictTests\T2PredictTests.cpp(33): FAILED!
REQUIRE( result[0] == "hello" )
with expansion:
"" == "hello
===============================================================================
test cases: 2 | 1 passed | 1 failed
assertions: 2 | 1 passed | 1 failed

c++ Random unexplained error

I'm creating a kinect project in Visual Studio 2008 using OpenNi, NITE and OpenGL.
At random times dureing development I get the following error:
Error result 1 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe'.
I've searched the internet with no luck.
I am able to create a new project and copy all my code across and it works fine but this is not something I want to be doing multiple times each day.
If any more info is required I'd be happy to give it.
EDIT full output window reads
1>------ Build started: Project: PointViewer, Configuration: Debug Win32 ------
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>fatal error RC1110: could not open ..\Res\NITE.rc
1>Project : error PRJ0002 : Error result 1 returned from 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\rc.exe'.
1>Build log was saved at "file://d:\Documents\Uni work\Year 4\Personal Project\Samples \PointViewer\Debug\BuildLog.htm"
1>PointViewer - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You are referencing your RC file via a relative path (..).
It seems likely your current directory is changing, and hence .., and the path to your RC file changes, causing the error.
You will have to make sure that your RC file is referred to in a way that doesn't change.
Try removing it from the project, and re-adding it, taking care to refer to it only in absolute terms.
Check your project and build settings for the directory where the build is to start, and how the filename is preserved in the project settings. You're looking for something like "Persist Filenames As...".
I had the same error. Move your entire project folder into documents/visualstudio/projects. If that doesn't work, move it to your desktop. It is just a linking problem, it can't find the resources. Make sure you aren't moving your folders around as this can cause these issues.
A possible reason for the error described - .rc file was renamed.
Check the .rc file name in your .vcproj file and see that it actually exists on disk.

How do I specify the manifest for side-by-side assemblies in my header file?

I am developing in Visual C++ 2008 using MSMQ. In Windows Vista, the application cannot locate the mqrt.dll which is found at C:\Windows\winsxs>cd x86_microsoft-windows-msmq-runtime-core_31bf3856ad364e35_6.
0.6002.18005_none_574cf1cdb624ee17\mqrt.dll.
The description of the manifest in WinSxS is:
<assembly xmlns="urn:schemas-microsoft-com:asm.v3" manifestVersion="1.0" description="MSMQ core runtime component." displayName="MSMQ Core runtime component" company="Microsoft" copyright="Copyright (c) Microsoft Corporation. All Rights Reserved." creationTimeStamp="2005-03-11T01:47:18" lastUpdateTimeStamp="2005-03-11T01:48:59">
<assemblyIdentity name="Microsoft-Windows-msmq-runtime-core" version="6.0.6002.18005" processorArchitecture="x86" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" />
I added a #pragma comment into my header file:
#pragma comment(linker, "\"/manifestdependency:name='Microsoft-Windows-msmq-runtime-core' version='6.0.6002.18005' processorArchitecture='x86' publicKeyToken='31bf3856ad364e35' language='neutral'\"")
The manifest is embedded into the exe using mt.exe. But it does not work. The error message in sxstrace is:
INFO: Resolving reference Microsoft-Windows-msmq-runtime-core,processorArchitecture="x86",publicKeyToken="31bf3856ad364e35",version="6.0.6002.18005".
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft-Windows-msmq-runtime-core\6.0.6002.18005__31bf3856ad364e35\Microsoft-Windows-msmq-runtime-core.DLL.
INFO: Attempt to probe manifest at c:\qt\datamon\bin\Microsoft-Windows-msmq-runtime-core.DLL.
INFO: Attempt to probe manifest at c:\qt\datamon\bin\Microsoft-Windows-msmq-runtime-core.MANIFEST.
INFO: Attempt to probe manifest at c:\qt\datamon\bin\Microsoft-Windows-msmq-runtime-core\Microsoft-Windows-msmq-runtime-core.DLL.
INFO: Attempt to probe manifest at c:\qt\datamon\bin\Microsoft-Windows-msmq-runtime-core\Microsoft-Windows-msmq-runtime-core.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft-Windows-msmq-runtime-core,processorArchitecture="x86",publicKeyToken="31bf3856ad364e35",version="6.0.6002.18005".
ERROR: Activation Context generation failed.
I tried the following pragma, but WinSxS does not even try to resolve msmq (probably because of the versionScope attribute):
#pragma comment(linker, "\"/manifestdependency:name='Microsoft-Windows-msmq-runtime-core' version='6.0.6002.18005' processorArchitecture='x86' publicKeyToken='31bf3856ad364e35' language='neutral' buildType='release' versionScope='nonSxS'\"")
What is the correct pragma to use?
I really don't know why it did not find the assembly. When I had trouble like this I went and got Process Monitor from SysInternals (now hosted at microsoft.com) and watched all file access into the WinSxS store.
iirc, manifest probing is/was done by a different process to the application process so don't filter on your own EXE's name.
Anyway the folder it was trying to look for was obviously different to the one that existed in my case that gave me a solid avenue to investigate.