Fortify scan .Net 6 Project on macOS - .net-6.0

I install fortify on masOS, and vs2022 for mac installed.
When I use ScanWizard (or commendline) to scan .Net 6 Project,
it always scan .xml / .json,
don't scan .cs file
Dose anyone help me to scan ?
Thanks.

Related

.Net 6 Not show in Visual studio TFM,

It's weird.
If I create a new project and choose DotNet 6 framework by Visual Studio 2022. I will get the NETSDK1045 error code.
But create a new project from the console, everything is Ok.
Run dotnet --list-sdks and see if the expected .NET6 version is installed.
My guess is that you might have x86 issue. If you have installed x64 version, install x86 version and vice versa and test if the issue is gone.
You can also try to repair your VS 2022 instance and/or upgrade to latest official version.
There is also a small probability that you select a project type that does not supports .NET 6 (for example .NET Framework Web App project type).
Also you may check your path contains the dotnet folders in the correct order for your architecture.
References:
https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1045
VS2017 : Target framework drop down does not show .NET Core 2.1 option

Warning major version 52 is newer than 51, the highest major version supported by this compiler

Basicly I'm super newbie and started internship in IT company. I installed VS with Xamarin. The problem that I'm facing is very frustrating. So even when i create empty project I can't compile it and get error like this :
Severity Code Description Project File Line Suppression State
Warning major version 52 is newer than 51, the highest major version supported by this compiler.
I searched all over google and asked so many people and still no fix of my problem. If anybody can help me via skype or teamwiever i will APPRECIATE so much. My skype: toniterdal , feel free to add me.
I was having the same issue, and tearing my hair out. I had the JDK Version 8 installed, but these warnings wouldn't go away, and eventually they generated a build-breaking error.
When I went to Tools -> Options -> Xamarin, and looked at the Android Settings, the Java Development Kit Location was pointing to jdk.1.7.xxxx, in Program Files (x86).
I changed it to 1.8.0_101, in Program Files. Then I restarted Visual Studio, and the same error happened again. Somehow, Visual Studio was detecting Version 7 of the JDK and pointing it to that automatically.
So the solution turned out to be very simple. As well as installing Version 8 of the JDK, UNINSTALL Version 7 of the JDK. As soon as I did that, Xamarin turned out to be much better behaved. This step solved a whole bunch of seemingly unrelated problems.
That error is telling you that the Java Class version that is being loaded was compiled with Java 8 (52) but Java 7 (51) is trying to load that compiled class.
Java 7 uses major version 51
Java 8 uses major version 52
Check which Java version(s) are installed on your machine and review Xamarin's requirements and Java installation steps (linked below)
Installing the Java SDK (JDK)
For people having problems with setting the appropriate JDK version, you might want to try to override this setting in the vs2015 options dialog:
Delete bin folder and obj folder and run the project it will be work fine
You have a bad proguard.jar file, you need to replace this .jar by a correct version. The steps below describing how to do that. Some colleagues had the same problem here.
Go to Preferences => SDK locations and copy the Android SDK location.
Go to that folder (mostly /Users/USERNAME/Library/Developer/Xamarin/android-sdk-macosx) and go to the folder tools/proguard/lib.
Here you find a proguard.jar.
Rename this to proguard_OLD.jar.
Download the last proguard file (like this one https://sourceforge.net/projects/proguard/files/)
Unzip and place the proguard.jar in the tools/proguard/lib folder
Rebuild your Project
Everything should be fixed!
You can find more info about the bug here:
https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
For me worked to change the SDK as well, but under Options->Xamarin->Android Settings, I don't have Cross Platform in Options for VS 2015Pro
Note for Windows 64 bit users, the JDK has to be the x86 version not the x64 version.
E.g. C:\Program Files (x86)\Java\jdk1.8.0_111
Kaloyan you can find the setting for the Java SKD under Tools->Options and the click on Xamarin in the Options list, then select Android Settings. I installed the latest Java version (8.0.111) and then did a clean on my project and it runs fine now with no errors. Thank you everyone for your posts!
In my case, i had to reinstall the JDK 8 (the last version) because other versions JDK 7 couldnt work even with new projects or clean up projects, and also i had to do a clean install of the android sdk.
This is how I solved the same issue I faced today:
From Control Panel > Uninstall a Program > uninstall the older Java versions which are on your system.
You should only have Jdk 1.8 and Jre 1.8 on your system.
Now go to C:/Program Files/Java and delete all older java versions.
If you have setup your JDK 1.8 and JRE 8 in C:/Program Files (x86)/Java then cut paste them into C:/Program Files/Java folder.
Then I restarted IntelliJ IDE which I am using. It automatically asked to update the path of SDK. Update the path to point to Jdk 1.8 and then I recompiled my files and things started working well.
Hope it works for you too!
In my case, I had just deleted .class files and worked fine.

.NET 4 vs .NET 3.5 C# application. Could not load file or assembly 'x' or one of its dependencies. The specified module could not be found

I have a C# WPF application built in VS 2010 with Target Platform set to x86. This exe calls on a Managed DLL with target platform ANYCPU. The Managed DLL has a reference to a C++ DLL which is compiled with Common Language Runtime Support (/clr) option.
On .NET 3.5 the app works perfectly with on any OS. It works fine on Win 7 as well, on both 32bit and 64 bit.
Now that I have converted the application and its DLLs to target .NET 4. If it is run on a .NET less than 4, it throws an error that .NET 4 is required which is the expected result.
The converted app works fine on my development system and on any system that has .NET 4 + .NET 3.5. So far so good!
However, on systems with ONLY .NET 4 (ie Win 8) or win 7 without .NET 3.5, I get the error:
Could not load file or assembly 'x' or one of its dependencies. The specified module could not be found.
'x' is the C++ dll compiled with Language Runtime Support (/clr) option.
So, in short the problem only happens on systems with .NET 4 only.
Any advice would be appreciated.
Thank you,
- Kam
.NET 4 has back compatibility with all previous versions. So it doesn't seem the problem is in the platform version. Might it be folder's security? Try to check its permissions.
There was a change in native code loading policies since .NET 4. To resolve this, please add the App.config file to your .exe project with the following contents:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
</startup>
</configuration>
This discussion may also help: What does 'useLegacyV2RuntimeActivationPolicy' do in the .NET 4 config?

Silverlight 4: Resolving Microsoft.Silverlight.CSharp.targets was not found?

I've been upgrading some Silverlight 3 apps to Silverlight 4 in Visual Studio 2010. My Silverlight 3 apps open fine in Visual Studio, but SL4 apps don't, with the following error:
C:\Path\To\MyProject.csproj : error : Unable to read the project file 'XNTVOD.AdminClient.csproj'.
C:\Path\To\MyProject.csproj(593,3): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
I had a problem with older VS Silverlight components and recently uninstalled most of the SL components, and right now in Add/Remove programs I have:
Microsoft Silverlight
Microsoft Silverlight 3 SDK
Microsoft Silverlight 4 Toolkit April 2010
The <import> declaration looks like this for the SL4 project:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
That folder, C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0 only has two files in it:
Microsoft.Ria.Client.targets
Microsoft.Ria.Client.VisualStudio.targets
What Silverlight development component am I missing in particular? I see a bunch of different options, from Silverlight 4 SDK Beta to VS Tools for Silverlight 4 and a bunch of others. I don't want to install stuff that will get me right back to the situation I had before this one with outdated components.
Looks like this is the missing piece...
Silverlight 4 Tools for Visual Studio 2010
The file that's missing ships in the Silverlight 4 SDK. You can either install just the Silverlight 4 SDK, or re-install the entire Silverlight 4 Tools for VS2010 package (which will re-install the developer runtime, SDK, a hotfix for VS2010, the Silverlight 4 Tools package, and WCF RIA Services).
You may get this with Silverlight version 4 projects when trying to open in version 5 if version 4 bits are not on that machine. What has worked for me (after several hours of trying everything) is to edit the csproj file and change the silverlight target version
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
From 4 to 5
This worked well for me...also had to install Silverlight 4 Developer runtime
Afer many tries, what worked for me was:
1. go to add or remove programms
2. remove all silverlight versions installed (4, 5 or even if version is not specified remove it too!)
3. install Silverlight 4 SDK
4. install Silverlight 5 for developers
Finally opened the project in VS 2010 SP1
A previously working installation can break when you install a new version of TFS on the server (or whatever it was that messed with my MSBuild).
My 'targets' files had disappeared from C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0 on Server 2012 and reinstalling the tools.
I believe it may be possible to just copy the targets files from another machine but not 100% sure.

.Net Framework 3.5 is needed for installing my VB 2008 Project?

Using VS 2008
I created a setup file for my Project, I run the setup file in my system, and My Project is working fine.
If I install my project to another system, is asking .Net Framework 3.5 at the setup time.
.Net Framework 3.5 is needed for installing my Project?
Before i installing my project, i install the .net framework 3.5, It taking to much time to setup?
How to solve this? or any other way to create a Project setup ?
Can any one help to solve my setup problem.
What you need to do is right click on the setup project in the SolutionExplorer and select the Properties menu option. You can then click on the Prerequisites button. This allows you to control what your setup program needs/wants in order to install your code.
If you don't need .NET 3.5 then just unselect it. This is just one more annoying thing that VS2008 does, you select .NET 2.0 as your target framework but it leaves .NET 3.5 as a pre-req.
If it is important for you that your program does ot require .NET 3.5, you can set up your project to target .NET 2.0. The the setup project will also see this, and (hopefully) remove the dependency when you update it.
If your project is VB.NET, you can set the Target Framework version here:
Project Properties -> Compile -> Advanced Compile Options...
If Your project is C#, it is here:
Project Properties -> Application
If you do this, of course you will not have available any .NET 3 specific functionality.
Do you rely on .net 35 features in your code. If not you can recompile with the project settings targetting .net 3.0 or 2.0.
The .NET 3.5 framework has two different installers to choose from: the bootstrapper and the full package.
The bootstrapper installer is small in size (2.7 MB). It's small because it downloads the required files from the internet when executed on the target machine. Depending upon the target's network bandwidth, it may take a long time to run.
The full package installer is large (237 MB), and does not require an internet connection to run.
If you are currently using the bootstrapper installer, you should try downloading the full package installer and running that on the target machines.
(That is, if you actually need .NET 3.5)
You can select either installer from here.

Resources