NAnt stops working when I try to run it - c#

I am trying to convert my nunit xml tests to html but I cannot get NAnt running
When I try to launch NAnt manually I get this right away followed by a Nant stopped working pop up:
The First Type of permission failed was: System.Security.Permissions.FileIOPermission
Unhandled Exception: System.Reflection.TargetInvocationException
I get a similar result when I try to start it's proccess in c# which I need to do in the end.
I made a build file from this website and I also tried their steps manually: http://ajeeshvl.wordpress.com/2010/11/16/converting-nunit-xml-test-result-to-html-formatc-seleniumrc-nunit-framework/
I tried moving the build file to the same folder as NAnt.exe and in the downloaded nunit2report file but that didnt make it work either.
It's very confusing to use NAnt and I still can not find Nunit2Report console exe(if there is one) and I've been trying to find clearer steps online.
My NAnt version is 0.92
And I am using Windows 8 as my OS
Thank you

Can you right click on the downloaded zip file for NAnt and unblock it. Then extract it and try. This was the issue I got on Windows 7.
Nunit2Report console exe is a part of nantcontrib. You will have to download it.
http://nantcontrib.sourceforge.net/

Related

Monodevelop won't Run any project

Hey,
I was using Monodevelop for some time(~4 months) and everything was perfect until this week.
Now whenever I try to Run a console project I get this error: /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(5,5): Error MSB3021: Unable to copy file "obj/x86/Release/AppName.exe" to "bin/Release/AppName.exe". Access to the path is denied. (MSB3021) (AppName).
The strange thing is that when I go to the folder bin/Release I DO find the AppName.exe. so I used manually mono AppName.exe to run the app.
An other problem is that in Godot mono I have the same error :/usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(4215,5): error MSB3021: Unable to copy file ".mono/temp/obj/Tools/GodotTestAA.dll" to ".mono/temp/bin/Tools/GodotTestAA.dll". Access to the path is denied. when I try to run a scene, so I can't even try my game.
I thought that the problem is from my installation of mono or monodevelop so I completely purged both of them and reinstalled them again, but nothing.
I also tried to run Godot mono as root(as root not with administrative rights), it worked but I know that it isn't good to run apps as root so I decided to look for another solution in the monodevelop forums, godot forums and here, but the only thing that I found is: Unable to copy file, Access to the path is denied but the post was 8 years old and any of the solution worked
Note: I am on Ubuntu(PopOS exactly).
I will really appreciate your help ;)
After I did some more research and tests I found that the problem is from my drive file format, mono(for some reasons) is not compatible with exfat file format.
So to fix the problem you will have to move your project to an ext drive.

C# Xamarin Can't find .apk after exporting ("aapt.exe" exited with code 1)

Today i tried to export my android ap as .apk
after clicking export android package it says "Building Android Package..." below and if i wait a little it says ready.
But if i go to Projectfolder/bin/Release i can't find my apk...
What could be the cause of that? It worked for me earlier,
In the Release folder there are only these files:
Thanks.
EDIT:
After cleaning the solution and exporting again, i got some more files but still no .apk
EDIT:
I finally found a solution! Before i say anything i want to thank all of you (especially Jon Douglas) for taking your time and trying to fix my stupid mistake.
So the solution: i renamed my "app-icon.png" to "app_icon.png" ................ that's it
Something is silently failing in generating your .apk. You should look at your IDE logs found in Help -> Xamarin -> Open Logs and look at the latest Ide.log. You should then see messages such as the following for Export Android Package (.apk): which will ensure it worked. Once that happens you'll see the .apk in the bin/Release folder.
I would also recommend using the newer option of Tools -> Android -> Publish Android App for a more well defined process in generating a signed .apk. You will then see a log such as the following:
After this, it will generate in the same directory but also put the aligned package in the main directory by default(Based on the wizard):

error CS2012: Cannot open <executable path> access to <executable path denied>

I was working on a WPF application in Visual Studio 2015 and all went well until unexpectedly the build dropped me the CS2012 error inform me that it cannot access/update the executable in the /Debug directory.
I tried the following and it didn't work:
Restart
Close VS and open the application again
Build->Clean
I couldn't find any solution in the web so I tried:
1. to move the whole project directory to another location.
2. creating a new WPF project and assembling it file by file with copy/pastes.
The weird thing was that in both cases the application worked in the new location. I continued the experimentation (in the original directory) and i tried to build a "Hello World" Console application in the same directory. The result was that the trivial console application didn't work and produced the same problem as the WPF application (CS2012 error).
Since I haven't noticed any activity of another program (i.e., antivirus) trying to quarantine (or changing the file/folder permissions of) this folder, I assume that this has been done by VS somehow but I don't know why. Perhaps it is a bug.
Is anyone has a logical explanation about this problem? And a way to fix it?
I found that my other running solution was referencing the same < executable path>.
Just make sure that no other process is using the referenced folder/file/dll
Try to close all processes, move the project to a different folder (on a different disk) b restart the computer and everything will work as it should. It worked for me without any problems. Hope this helps someone
I wanted to quickly test something in a .NET Core Console Application Solution and ran into this issue due to BitDefender blocking the resulting binaries.
I've named the app client which actually was the culprit. Renaming my solution fixed this.
Sometimes antivirus softwares can block copying an exe file from a folder to any path. You can manage by settings or the easiest way is to shut down live protection while you are coding and debugging.
:)
Deactivate your anti-virus for a while and try again.
This works for me.

run project c# with .dll embebed, works if run from VS2010, dont works from executable

i have one project in c#, in the project i add a file.dll, this work when i run the program from VS2010, but when i try to run form /bin/debug/myproject.exe it doesn't work, and just fail when the program use the file.dll
i tried:
file.dll configure its properties like:
build action: Content
also
build action: Embedded Resource
but still doesn't work...
sorry for my english, hope you can help and understand my problem.
Have you tried the build action: none and copy to output dir: copy always or copy if newer?
Why do you don't add the dll as a reference (copy local: true if needed)? Or do you don't want to use it?
Well i found the problem, my application communicates trough console with the file.dll , when i run mi project from VS this console is open default but when i execute the application from /bin/debug/myproject.exe this don't open any console, so the communitacion failure, so now i think the solution is create a console for this communitacion that running behind the application

Setting up 32feet library

I'm trying to get started with this library: 32feet
I have a Broadcomm Bluetooth Stack and haven't been able to figure out how to get this library set up. When I run my code, I get:
Unhandled Exception: System.PlatformNotSupportedException: No supported Bluetooth protocol stack found.
After digging around on their site, I found this: Installation instructions
It says to copy the appropriate DLL's into the project and then run the Test32FeetWidcommWin32.exe. I've tried putting the files in every single folder in my Visual Studio project and then running that EXE, but I still get the same error. Initially I tried just adding the InTheHand.Net.Personal.dll file as a reference to my project, but that didn't work either.
What could I be doing wrong?
It may also simply be that BlueTooth is not turned on in Windows.
I was using the .NET InTheHand library, and received this message only because BlueTooth was turned off in Windows, and resolved it by activating BlueTooth.
I just solved this. I think the problem was an old reference in my project to the NETCF version of the DLL from when I was trying to brute-force a solution, so I wiped my project clean and then started adding everything again and it worked!
A helpful tool to those trying to figure out their problem with this is to copy and paste the app.config file into your release directory with the app you are creating, and change the name to <YOUREXENAME>.exe.config. When you then run your EXE file, it should create a more detailed trace file. For mine, I found that coredll.dll was the culprit by not loading and was masked by the Stack not supported exception. After an easy Google search I found the problem to be with NETCF.
edit: To be clear, after I cleaned out my project a bit I re-added the reference to the correct InTheHand.Net.Personal.dll file and also added the 32feetWidcomm.dll file to my Release folder.

Categories

Resources