Gallio error "An exception was thrown while exploring tests." - visual-studio-2010

Hi I have a test project with Gallio 3.2 b.435 within VisualStudio 2010. Every time I launch any test the output windows pops out.
this is the error message
[error] An exception was thrown while exploring tests.
Location: C:\xxxxxxx(73)
Details: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
this is the code at the line specified
71: [Test, ExpectedException(typeof(RulesException<Story>))]
72: public void CanNotSaveItemIfInvalid()
73: {
74: var story= new Story{ Id = 100, Tilte= "test" };
75: repository.Save(story, new MembershipUser());
76: }
This error isthrown no metter what test is under testing (the project contains 700 test)
Of course ;) the test compiles and passes and I cannot understand the error.
bye Stefano

This error is a known issue. It's due to a bug in the early version of Mono.Cecil (v0.6) that was used by the Gallio core engine. It has been fixed recently: Gallio is now using Mono.Cecil v0.9.
Please try out the latest version of Gallio (v3.2.2)

Related

Error CS2007: Unrecognized option: /analyzerconfig

I have a Unity project which I use Roslyn for Code Analysis and I found that you can get the warnings and errors report from console using msbuild.
In the PC I have VS 2019 version 16.6.3, it gave the following error that I will comment below and updated to version 16.11.9, thinking it was the incompatibility and still gets the error. I tried running the command described below on other PCs with other versions of VS and it works fine, but I have not been able to identify what makes the command work well.
Command:
By running the following line in Developer Command Prompt for VS 2019:
msbuild ScriptsAssembly.csproj /p:RunCodeAnalysis=true /t:Clean;Rebuild
I expect to see the total number of warnings for the project and zero errors with successful execution like this:
Instead I get the following error:
CSC : error CS2007: Unrecognized option: '/analyzerconfig:C:\Users\...\Documents\...\...\UnityProject\.editorconfig' [C:\Users\...\Documents\...\...\UnityProject\SimpleJSON
.csproj]
Done Building Project "C:\Users\...\Documents\...\...\UnityProject\SimpleJSON.csproj"
(default targets) -- FAILED.
Done Building Project "C:\Users\...\Documents\...\...\UnityProject\ScriptsAssembly.csp
roj" (Clean;Rebuild target(s)) -- FAILED.
Build FAILED.
...
"C:\Users\...\...\...\...\UnityProject\Project.csproj" (Clean;Rebuild target) (1) ->
"C:\Users\...\...\...\...\UnityProject\SimpleJSON.csproj" (default target) (2:3)
->
(CoreCompile target) ->
CSC : error CS2007: Unrecognized option: '/analyzerconfig:C:\Users\...\Documents\...\...\UnityProject\.editorconfig' [C:\Users\...\Documents\...\...\UnityProject\SimpleJS
ON.csproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.91
What I expect to see is a thousand warnings, instead of 1.
I don't know if I am missing a package to install in VS. I have seen the error that the compiler message mentions in the Microsoft documentation, but it doesn't help me much.
Any idea, or help is welcome.

Solve "LINK : fatal error LNK1561: the entry point must be defined"

I am working with Visual Studio Ultimate 2012.
If I run the code from Visual Studio it works properly. But if I take the ".exe" file that it generates at the Debug file it doesn't in another computer.
That is why I change the menu from "Debug" to "Release", but then it doesn't compile and shows the message: "LINK : fatal error LNK1561: the entry point must be defined"
What do I have to change at the configuration to create a ".exe" that works in any computer?
I have a main defined in the project as void main(array<String^>^ arg)
Seems the signature of the main function is wrong. The expected signature for the EntryPoint main function should have int return type in VS2012.
Please try changing signature of function to:
int main(array<String^>^ arg)
This may resolve your problem.

Visual Studio 2015 Native Unit Test Can't Find 3rd Party .DLL

I'm using Visual Studio 2015. I created a .dll and would like to write a Unit Test. I Created a New Project using the Native Unit Test Project found in the
File | New | Project...
Visual C++ | Test | Native Unit Test Project
All works until I run it. The code requires using the SQLite .dll (sqlite3.dll). When I run the test, I get the error dialogbox:
The program can't start because sqlite3.dll is missing from your computer. Try reinstalling the program to fix this problem.
I have the .dll so I suspect the message saying it is "missing" really means "unable to find".
I've attempted a lot of things to fix this, including editing the following Property Pages values:
Configuration Properties:
Debugging | Environment
VC++ Directories | Executable Directories
These changes to my project make no difference. Does anyone know how to get VS2015 testing to find 3rd party .dlls?
Thx.
Update:
Tried setting Configuration Properties | Debugging | Environment to:
PATH=%PATH%;$(SolutionDir)sqlite;$(LocalDebuggerEnvironment)
Then thought that I might need to reboot the Visual Studio environment for the PATH to be updated. Didn't help. It appears that if I let Visual Studio sit for a while, I get the following message:
An unhandled win32 exception occurred in StandardCollector.Service.exe [6324].
I don't know if the exception is related or not. I'm using VS2015 update #2 if that matters.
Update:
I got a stack dump from the crash...
ntdll.dll!string "Enabling heap debug options\n"() Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!StandardCollectorService::~StandardCollectorService(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached::vector deleting destructor'(unsigned int) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached<class StandardCollectorService>::Release(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached<class ATL::CComClassFactorySingleton<class StandardCollectorService> >::vector deleting destructor'(unsigned int) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CComObjectCached >::Release(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!ATL::CAtlComModule::Term(void) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!_guard_dispatch_icall_nop() Unknown
ucrtbase.dll!(void)() Unknown
ucrtbase.dll!__crt_seh_guarded_call::operator(),class &,class >(class &&,class &,class &&) Unknown
ucrtbase.dll!_execute_onexit_table() Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!operator new(unsigned __int64,struct std::nothrow_t const &) Unknown
DiagnosticsHub.StandardCollector.Runtime.dll!operator new(unsigned __int64,struct std::nothrow_t const &) Unknown
ntdll.dll!LdrShutdownProcess() Unknown
ntdll.dll!RtlExitUserProcess() Unknown
ucrtbase.dll!exit_or_terminate_process() Unknown
ucrtbase.dll!common_exit() Unknown
StandardCollector.Service.exe!CStandardCollectorService::OnStart(void) Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

Visual Studio 2013 Unit Test Project throws SqlBuildTask error

I have a solution in Visual Studio 2013 which contains a SQL Server Database Project and I have recently added a Unit Test Project which has 136 tests in it. In Test Explorer, when I click on Run All to execute all of the tests, I receive the following error:
04018: The "SqlBuildTask" task failed unexpectedly.
System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String, System.Collections.Generic.Dictionary`2)' to access method 'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)' failed.
at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(String filePath, Dictionary`2 referenceMetadata)
at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.CreateCustomSchemaData(String filePath, Dictionary`2 referenceMetadata)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.ProcessReferences(TaskLoggingHelper providedLogger, SqlTaskHost host, ErrorManager errors)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.LoadImpl(ITaskHost providedHost, TaskLoggingHelper providedLogger)
at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.Load(ITaskHost providedHost, TaskLoggingHelper providedLogger)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteLoadTaskHostStep()
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func`1 step)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()
This should be fixed by installing the latest version of SSDT, available here: https://msdn.microsoft.com/en-us/dn864412
If the latest version of SSDT is already installed, try a repair installation.

Why do I get a 1720 error when my InstallShield setup tries to run my VBS custom action?

The Custom Action is configured as follows:
Custom Action Name: MyCustomAction
VBScript Filename: <PathVar01>\MyFolder\MyVBSfile.vbs
ScriptFunction: MyFunction
Return Processing: Synchronous (Check exit code)
In-Script Execution: Immediate Execution
It is being executed via the following InstallScript code:
result = MsiDoAction(ISMSI_HANDLE,"MyCustomAction");
When the setup reaches that line in InstallScript, the installer shows an error alert, stating:
"Error 1720.There is a problem with
this Windows Installer package. A
script required for this install to
complete could not be run. Contact
your support personnel or package
vendor."
The result code returned by MsiDoAction is that of '1603', which, according to winerror.h, is:
//
// MessageId: ERROR_INSTALL_FAILURE
//
// MessageText:
//
// Fatal error during installation.
//
#define ERROR_INSTALL_FAILURE 1603L
Why is this happening? I was starting to doubt that the file was included properly. Yet, I am pointing to the correct file, and I've tried including the VBS via the InstallShield Support Files, thinking this would ensure the file was present with the setup, but same result.
Running the setup with logging enabled revealed the problem:
Action 13:29:19: MyCustomAction.
Action start 13:29:19: MyCustomAction.
Error 1720.There is a problem with
this Windows Installer package. A
script required for this install to
complete could not be run. Contact
your support personnel or package
vendor. Custom action MyCustomAction
script error -2146827278, Microsoft
VBScript compilation error: Expected
identifier Line 163, Column 37,
blnExample,)
To run a setup with logging enabled:
"C:\SetupFolder\setup.exe" /V"/l*v
c:\Install.log"
This forum thread was helpful.

Resources