I have developed a website in VS2010 with XP OS & it's working fine. Now I upgraded my PC to Win-7 with VS2012, whenever I try to run the same website in VS2012 it's throwing following error.
Compiler Error Message: CS1647: An expression is too long or complex to compile
Source Error:
[No relevant source lines]
Source File: Line: 0
Show Detailed Compiler Output:
C:\Program Files\Common Files\Microsoft Shared\DevServer\11.0> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" ..................................etc
Microsoft (R) Visual C# Compiler version 4.0.30319.17929
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
fatal error CS1647: An expression is too long or complex to compile
I need a help to complete this project in VS2012. Thanks in advance
Though I have not gone very deep. This may be Microsoft's memory management problem. You can obtain the output by separating code blocks. Refer to the following
Getting "An expression is too long or complex to compile" when using c# target and
Work-around for C# CodeDom causing stack-overflow (CS1647) in csc.exe?
Related
Reproduction steps:
Stack: Windows 10, Visual Studio 2019 professional, BizTalk Server 2020 developer edition CU1.
In Visual Studio create a new Biztalk Server Project
Manage Nuget Package, Add a nuget package. pick one:
Known to break the build
autofac 6.0, 6.1, 6.2
nodatime 3.0.5
Azure.Storage.Blobs 12.9.1
Known to not break the build
autofac 5.2
many others I tested.
F6 (Build) or run msbuild
As far as my testing was going, whenever the nuget packages directly list a variant with a .net framework as a dependency, it works. Listing only .net standard and .net 5 as a dependency, as in the list above, fails the buil.
actual error:
PS C:\code\autofacRepro> msbuild
Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 8/24/2021 3:01:10 PM.
Project "C:\code\autofacRepro\autofacRepro.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "C:\code\autofacRepro\autofacRepro.sln" (1) is building "C:\code\autofacRepro\autofacRepro.btproj" (2) on node 1 (default targets).
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: The "AddBizTalkHiddenReferences" task failed unexpectedly. [C:\code\autofacRepro\autofacRepro.btproj]
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: System.ArgumentException: String cannot have zero length. [C:\code\autofacRepro\autofacRepro.btproj]
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: at System.Reflection.AssemblyName..ctor(String assemblyName) [C:\code\autofacRepro\autofacRepro.btproj]
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: at Microsoft.VisualStudio.BizTalkProject.BuildTasks.AddBizTalkHiddenReferences.GetAssemblyNamesFromItems(ITaskItem[] items) [C:\co
de\autofacRepro\autofacRepro.btproj]
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: at Microsoft.VisualStudio.BizTalkProject.BuildTasks.AddBizTalkHiddenReferences.Execute() [C:\code\autofacRepro\autofacRepro.btproj
]
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\code\autofacRepro\autofacRep
ro.btproj]
C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkCommon.targets(190,9): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [C:\code\autofacRepro\autofacRepro.btproj]
Done Building Project "C:\code\autofacRepro\autofacRepro.btproj" (default targets) -- FAILED.
Done Building Project "C:\code\autofacRepro\autofacRepro.sln" (default targets) -- FAILED.
Build FAILED.
A repro zip package is available in this github issue. (at first I thougt, it was a special issue with autofac, but it is not)
My old stack (windows server 2016, visual studio 2015, biztalk 2016) is not affected. We are using autofac 6.1 in biztalk projects there without any issue.
I feel like this is a BizTalk bug but I am not smart enough to find the way Microsoft allows reporting it.
So finally the question is, is there a workaround or a bugfix?
I've had this with one of my own packages. This package was targeting .NET Standard 2.0. I had to add .NET Framework 4.8 (in my case) specifically as a target framework in the class library and recreate the package for it.
For public packages, you may want to create a PR or make a fork to include targeting of .NET Framework. Your BizTalk project then needs to reference the .NET Framework assembly rather than the .NET Standard one.
I'm using visual studio 2015 and Qt5.
I'have already added qt5.natvis on Vislaualizers folders.
I have set the "Use Native Compatibility Mode" option in Tools > Options > Debugging > General menu.
Even so, QString value does not appear correctly when debugging. Only memory direction appears on Locals/Autos/Watch windows. Any idea?
I have set Verbose option for Native diagnostic messages and this is what I get:
Natvis: Parsing natvis xml file: D:\<user_name>\Documents\Visual Studio 2015\Visualizers\qt5.natvis.
Natvis: Fatal error:
Natvis: Parsing natvis xml file: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\PythonDkm.natvis.
Natvis: Fatal error:
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(128,25): Error: a pointer to a bound function may only be used to call the function
Error while evaluating 'd->data,sub' in the context of type '<executable>!QString'.
Natvis: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers\qt.natvis(127,6): Ignoring visualizer for type 'QString' labeled as 'QString' because one or more sub-expressions was invalid.
Original qt5.natvis from qt plugin for MSVS contains some strange problem. I use alternative natvis.
I'm not sure if this will work correctly on MSVS 2015, if so, you can ask the author to help you
You need to use older natvis files. The ones you're using appear to use functionality that wasn't available in VS 2015.
The natvis file comes from the qt-labs/vstools repository. GitHub's online browser shows two revisions for src/qtvstools/qt5.natvis.xml, one from 2018, another from 2020.
The the 2018 revision also renamed the file from src/qtvisualizer/qt5.natvis.xml, with one prior revision.
Since the oldest revision is from 2016, maybe that'd work for you with VS 2015.
I'm using Visual Studio Professional 2012 on a Windows Server 2008 R2. When I run my MVC web application under IIS, I get the error:
Compiler Error Message: CS0433: The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both
'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.DLL' and
'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'
After hours trying to resolve this, I discovered that when I "use Visual Studio Development Server" it works. This is good, but I'd like to get it working with IIS too.
Under IIS, the "detailed compiler output" includes:
c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /t:library /utf8output ...
/R:"C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.Common.dll" ...
/R:"C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.dll" ...
/R:"C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll" ...
Under the VS Development Server (when I add a dummy error to my view), the only reference to ReportViewer is:
C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output ...
/R:"C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.dll" ...
I've tried several things to try to get it working under IIS. There aren't any references to the 10.0.0.0 version of ReportViewer in my solution. I did a clean and rebuild. In IIS, the default web site did have a handler mapping referencing an older version of ReportViewer, which I removed. (I also tried adding a new handler mapping - no version specified - but that didn't work so I removed it.)
I tried the qualifyAssembly web.config node, as per The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both
And as per MSBuild Using Wrong Version of Assembly to Compile RDLC File I tried determining what VisualStudioVersion my build is using and even editing Microsoft.ReportingServices.targets (I put it back to what it was). This is the part that was getting to be over my head and I didn't want to mess anything up. Any ideas would be much appreciated.
Currently, I am trying to retarget my windows store app to windows 8.1 preview. The problem is, that I used sqlite-net package in one of my project. I followed steps described here:
http://www.lyalin.com/2013/07/09/sqlite-for-windows-runtime-for-windows-8-1-apps/ and downloaded pre-release version of sqlite visual studio extension from this link:
http://www.lyalin.com/2013/07/09/sqlite-for-windows-runtime-for-windows-8-1-apps/.
I have added a reference to a newly installed sqlite for windows runtime in my project, but I got an error while building:
Error 2 Windows Runtime type 'Windows.Foundation.Point' was found in
multiple referenced winmd files. Please remove either 'C:\Program Files (x86)\Microsoft
SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral\platform.winmd'
or 'C:\Program Files (x86)\WindowsKits\8.1\References\CommonConfiguration\Neutral\Windows.winmd'
from the list of referenced files. C:\Users\Jarosław\Desktop\BCM\Win8Client\MetriceModel\WINMDEXP
MetriceModel (Windows 8.1)
Somewhere, on one of the forums somebody hinted, that if you remove reference to microsoft visual c++ runtime package from the project, it will solve the problem. After I did that whole solution compiled fine, but I got a following exception at runtime:
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Exception is thrown at a line:
#if NETFX_CORE
SQLite3.SetDirectory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
#endif
of SQLite.cs file (file is from mentioned earlier sqlite-net package).
Project's folder bin/Debug/AppX contains file sqlite3.dll. Every project in my solution has x86 as a platform target. How do I fix this issue? Before migrating the project everything worked fine.
You must install the official version of vsix package on sqlite download page (v3.8.0.2).
In the Visual Studio Add-in manager, this package version is 3.7.1.17 and it's not correct.
After, i think it is a bug, you have to select the good processor (platform target).
I had the same error because I deployed a migrated winrt application (8.1) compiled in x86 on a x64 machine...
=> in windows 8.0 it works, but not in windows 8.1.
If you have a x64 machine you have to select the x64 target compilation. I hope it will be fixed in futur...
can you please re-install the preview of SQLite for WinRT 8.1? There was an issue with the initial package, but we worked with them to update. http://sqlite.org/download.html
If you have an exception with
SQLite3.SetDirectory(/*temp directory type*/2,windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
Check if your project uses x86 and not any CPU
i have a problem.. i'm trying to compile qt for vs 2010..
But i can't..
i'm following this guide:
http://thomasstockx.blogspot.com/2011/03/qt-472-in-visual-studio-2010.html
i follow all the steps (with the exception of -shared config, because i want -static) but when i digit nmake the vs prompt tell me this:
Microsoft (R) Program Maintenance Utility versione 10.00.30319.01
Copyright (C) Microsoft Corporation. Tutti i diritti riservati.
NMAKE : fatal error U1064: MAKEFILE non trovato. Nessuna destinazione specificat
a.
Stop.
c:\Qt\4.8.0>
it didn't find the makefile... i try with 2 different pcs with the same version of qt, vs and windows and in both don't work so i do something wrong.. but i can't understand where..i triedsearching but with no luck...
Thanks in advance...
I would definitely install Perl and try again. If it's not needed why should it give that message at all?
However, I don't seem to remember I had Perl installed so the error is rather strange.
The tutorial was written originally for Qt 4.7.2 and worked up to 4.7.4.
But I haven't tested it with 4.8. Before 4.8, VS2010 just wasn't supported by Qt, this has recently changed, so like Frank said, you should probably try to download the VS2010 packages since they now support it.