I'm using Teamcity to run a build, getting the following error:
"Could not find "LC.exe"
Make sure the Microsoft Windows SDK is installed
(Registry key:..\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools-x86")"
Tried installing SDK from: https://www.microsoft.com/en-us/download/details.aspx?id=34860, didnt work.
Teamcity Version: 9.1.1,
Windows server 2012
I have .net 4.6.1 installed on the server. I do not want to install VS2010 as it is build agent. Please suggest.
Thanks.
Related
Running C# MAUI for Android/Windows and it build and runs well.
Now, i want to build and run for iOS but get problems.
When installed Visual studio for Mac, XCode on a Mac and using Pair to Mac I get this error:
Error dotnet validation failed, an unexpected error occurred No
receiver was found for topic xvs/idb/initialize-dotnet-sdk
Someone got this problem?
Some details about the setups I have:
My developer computer, Windows 10:
Microsoft Visual Studio Community 2022
Version 17.4.3
VisualStudio.17.Release/17.4.3+33205.214
Microsoft .NET Framework
Version 4.8.04084
...
VisualStudio.Mac 1.0
...
Xamarin 17.4.0.312 (d17-4#be7e8d1)
Visual Studio extension to enable development for Xamarin.iOS and
Xamarin.Android.
...
Xamarin.iOS and Xamarin.Mac SDK 16.1.1.27 (933c6c2c9)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
My Mac, MacOS Monterey 12.6.2
Microsoft Visual Studio for Mac 17.4.2 (Build 17)
...
.NET 6.0.12 (64-bit)
Architecture: X64
...
Apple Developer Tools
Xcode 14.2 (21534)
Build 14C18
...
Xamarin.Mac
Xamarin.Mac not installed. Can't find
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.
...
Xamarin.iOS
Xamarin.iOS not installed.
Can't find mtouch or the Version file at
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current.
In my case Visual studio restart helped
What version is your Maui project, .Net 6 or .Net 7? If it is .Net 7. You need to install the latest Visual Studio 2022 for Mac version 17.5 Preview on your Mac. You can also check the following:
1.You can also check whether your Mac is enabled for remote login (open System Preferences and go to the Sharing pane->Check Remote Login in the Service list- >configured to allow access for All users).
2.You can right-click your project and select Properties->iOS->Build->Linker behavior to check whether you have selected Link Framework SDKs Only.
3.According to your error
Xamarin.Mac not installed.
Xamarin.iOS not installed.
You can check whether Xamarin.iOS and Xamarin.Mac are installed on your Mac when installing VS.
For more details, you can refer to the official document:
Installation
Pair to Mac for iOS development
I am running Visual Studio 2019 on a MacBook Air M1 and I have installed and downloaded the .NET Core SDK. When I am trying to run an asp.net solution from the terminal with the 'dotnet run' command I get the following message:
Failed to load /opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib, error: dlopen(/opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib, 0x0001): tried: '/opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
The library libhostfxr.dylib was found, but loading it from /opt/homebrew/Cellar/dotnet/6.0.103/libexec/host/fxr/6.0.3/libhostfxr.dylib failed
Installing .NET prerequisites might help resolve this problem.
I have installed and downloaded both the .net SDK for 3.1, 5.0 and 6.0. The solution runs fine from the play button in Visual Studio, but it will not work with the command.
I am just wondering if anyone knows if there is a workaround on this?
Thanks in advance!
Error:
Method 'MyController' in type 'MyProject.AppStart.Selector' from
assembly 'MyProject, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=......' does not have an implementation.
Background:
I have an ASP.NET project with target framework set to .NET Framework 4.6.2. After installing Microsoft.Azure.SignalR.AspNet 1.0.0-preview1-103a17from nuget package manager, it builds and runs fine on Visual Studio 2017. No problem at all. When I deploy the release to my server and try to access any of its services, I get the above-mentioned error. The method is implemented in a class which implements System.Web.Http.Dispatcher.IHttpControllerSelector.
Configuration:
The machine on which code works: Windows 10 Version 1809 (OS Build 17763.316). Visual Studio 2017 15.9.6.
The machine on which code does not work: Windows Server 2012 R2 Version 6.2 Build 9200. IIS version 8.5.9600.16384.
What I tried:
Clean/Rebuild deploy again.
Delete obj and bin folder, publish and deploy again.
Deleted CachedAssessmbly as suggested here.
Change Configuration from Release to Debug.
Install Azure SDK in the Windows Server 2012 R2 machine.
Try to install the dependencies of Microsoft.Azure.SignalR.AspNet without directly installing Microsoft.Azure.SignalR.AspNet. It appears that the error starts to Microsoft.Azure.SignalR.Protocols is installed. The dependencies of the Microsoft.Azure.SignalR.Protocols are:
All of these four dependencies are being added when I install Microsoft.Azure.SignalR.Protocols i.e. they are not already being used.
I can't seem to find the issue.
Update:
I deployed the folder on the above mentioned Windows 10 machine and used IIS Manager to create an application. The application works fine on the same machine without Visual Studio.
In the Windows Server 2012 R2 machine, I had originally installed .NET Core 2.2 runtime instead of the SDK. I installed the following in order:
.NET Core 2.2 SDK (deployment still didn't work)
.NET Framework 4.7.2 Dev Pack (asked for restarted, postponed it)
.NET Framework 4.6.1 Dev Pack
After installing the .NET Framework 4.6.1 Dev Pack, I restarted. And now the deployment works.
I can't pinpoint the solution but my guess is that installing .NET Core 2.2 SDK fixed the issue. After it got installed, the installation window prompted some version of Microsoft.AspNetCore has been installed. It didn't ask for a restart but I guess as .NET Core 2.2 Runtime was already installed and being used by another application, a restart was needed.
It is quite strange that Microsoft.AspNetCore wasn't installed along with .NET Core 2.2 Runtime.
It took quite some time to fix this issue as typeloadexception can arise in many other scenarios.
Hope this solution helps other people as well.
I have installed TeamCity Professional 8.1.3 (build 30101) onto a clean box and I am trying to run a new build. I have copied over the msbuild tools from my local dev machine to the new server and placed them in the x86 folder. I have also installed the IIS web role, .net feature, registered IIS from the cmd line, and installed MSBUILD tools 2013. For some reason, I still am unable to compile anything. I get the following error
SGEN An attempt was made to load an assembly with an incorrect format:
C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll.
Is anyone familiar with this error? I am trying to build an app in .NET v4 using msbuild tools v4.
I was getting this error building a project that targeted .NET Framework 4.5.1. I resolved the issue by installing Microsoft .NET Framework 4.5.1 Developer Pack
You can get the SDK (aka Targeting Pack, aks Developer Pack) for other versions you may want to target at .NET SDKs and Downloads
The solution was installing VS2012 on my build machine. This may not be the most efficient, but it beats installing small packages and chasing around things that need to be registers in the GAC.
I published my app in Visual Studio 2008.
I'm getting a problem installing on another PC(this PC dont have .net).
During the install, the following error appears:
"Unable to run or install the application. The application requires that
assembly stdole version 7.0.3300.0 be installed in the Global Assembly Cache (GAC)
first."
plz help me.
If you want to install a .NET program on another PC, you have to install the same version of the .NET framework as your are targeting with your program first. (With visual studio 2008 that is probably 3.5)
Also, make sure you deploy the assembly for stdole in your installation package.