Unable to create a blank working bridge.net project via visual studio template - bridge.net

Everytime I try to create a bridge.net new project I get the following error:
Could not add all required packages to the project. The following
packages failed to install from [the user appdata local
folder]\Microsoft\VisualStudio\14\extensions\IJHDC25V.XOU\Packages.
Bridge.1.10.0 : Solution is not opened or not saved. Please ensure you
have an open and saved solution.
Trying to build the project leads to the 'Bridge' namespace missing.
I did the following:
Download the bridge.net .vsix package from
https://visualstudiogallery.msdn.microsoft.com/dca5c80f-a0df-4944-8343-9c905db84757
Run the package
Create a new project -> Bridge.net -> Class Library
Named the project 'Demo'
I verified the folder exists and is populated. I've tried running Visual studio as an administrator and as a standard user.
How do I get a working blank Bridge.net project with the visual studio template?

I realise that this doesn't quite answer precisely the question asked but I don't use the VSIX package to create Bridge.NET projects, I just create a new (standard) class library and then use NuGet to add "Bridge". This adds the Bridge compiler and it adds a "demo.html" file and a basic "bridge.json" config file to get you started. (If you wanted to write a Bridge library and you didn't want the "starter park" items then you can add the NuGet package "Bridge.Min" instead).

The project needs to be saved to disk.
In Visual Studio under Tools / Options / Projects and Solutions tick the Save new projects when created checkbox.
Then create a new project.

Related

Can't compile freshly made extension library

I cannot successfully compile an extension library that is freshly created using the Customization Project -> Extension Library -> Create New.
When compiling the freshly created extension library, I get the following error in the output, but no errors show in the error report:
1>C:\Program Files (x86)\Acumatica ERP\SilcotekDev\App_Data\Projects\ManufacturingTest\ManufacturingTest\Test.cs(6,7,6,9): error CS0246: The type or namespace name 'PX' could not be found (are you missing a using directive or an assembly reference?)
I have another custom extension library which had compiled successfully in the past, but today is not. Here is the full error list from that project's compilation:
I do have a custom DAC which I imported directly into the extension library, and I had compiled it before with that DAC added. Today it won't compile at all.
With update 3 of version 6.1 Acumatica has changed the target framework for its websites from 4.5.1 to 4.5.2. Unfortunately, the target version of the Addon.csproj VS project from the \App_Data\WebsiteSolution\Addon folder was not updated to .Net Framework 4.5.2 until update 9 of ver. 6.1 (build #6.10.0945). Because of the lower target version set for extension library VS project, VS cannot build the dll and therefore copy it to the Bin folder of your website.
There are 2 ways to resolve this type of an issue:
Change target framework version in VS for your extension library project:
Open the Addon.csproj VS project in a text editor, like NotePad, and change the target framework to v4.5.2 as shown in the screenshot below (located in the \App_Data\WebsiteSolution\Addon folder inside your Acumatica website root folder). Create a new customization project inside Acumatica, then in Customization Manager create extension library for the new project
There are a lot of things that could cause this problem.
1. is your program set up to read the PX namespace?
2. are you References setup the right way. You can always check by right clicking on the reference and selecting "Add reference"

What's the best way to debug a nuget package with its souce code?

I'm using a NuGet package in my project and sometimes I need to debug into the source code.
The NuGet package itself is open sourced on github.com so its source code can be downloaded as well. I can build and generate .dlls on my local computer.
But during my debugging, I can see the function names of the package, and even the file path of the source code (or course it's from someone else's computer), but it's grayed out and I can not double click to go into the source code. I checked the right-click menu, there's no way to load symbols there.
In this case, how can I let visual studio load the debug symbols so I can debug into the package's source code?
My understanding is that you install the specific package in your project, if you want to debug the package in your project, you could add the source file to the solutions Common Properties -> Debug Source Files list.
If you download the source code of the package and open/compile it in your VS, I think you could refer them manually to your previous project, and then debug it directly like add breakpoint or others as general class library project.
Reference:
How to debug using Nuget source code
How to debug into my nuget package deployed from TeamCity?

Visual Studio 2012 Nuget Update Packages keep redownloading

Using: Visual Studio 2012 ultimate with Update 4
Problem: Every time I use update-package, it redownloads the same version.
Scenario:
1. I fire up VS2012, make new project Asp.NET MVC4 Web Application -> Internet Application.
2. I type 'update-package' in package manager console. Downloads every package update. I save the solution. Exit.
3. I create a new project Asp.NET MVC4 Web Application -> Internet Application.
4. Since packages are not updated, I type 'update-package' again.
But when I do, it will DOWNLOAD again the SAME version that I already downloaded during my first project.
My problem is, I am not always connected to the internet so do I have to find internet connection everytime I 'update-package' to update the template.
Is there a way I can save the package updates locally so when I do 'update-package' I dont have to be connected to the internet to update all the packages?
You can create folder for nuget packages, for example D:\NugetLocalSource\, and add specify it as package source in nuget settings. Tools -> Nuget Package Manager -> Packages Manager Settings -> Package Sources -> Add.
When you updated packages first time they were downloaded to solution_folder\packages\. You can copy *.nupkg files from packages folder to you local source and then will you be able use them offline for other solutions.
Or you can pre-download packages from nuget.org another way.
One more place where you can find downloaded packages locally - it's nuget cache. It's placed in C:\Users\<user>\AppData\Local\NuGet\Cache. Here is nice article about how to use it

Project is targeting frameworks not installed or are included as part of future updates to Visual Studio

I am attempting to convert the Microsoft.Health C# class library that is installed as part of the HealthVault SDK, using instructions provided here. After following these instructions, I get the following error when attempting to load the project into Visual Studio 2013.
"The project is targeting frameworks hat are either not installed or
are included as part of future updates to Visual Studio. See
http://go.microsoft.com/fwlink/?LinkId=287985"
Visiting the link takes me to .NET SDKs and Downloads. Once there, I have no clue on what needs to be done.
I do realize that one will have to leverage the Portable Class Library Contrib project to fill in some missing bits, especially code related to System.Security. This, I will deal with later.
Any one run into a similar problem?
Maybe so late but for those who have the same problem.
I had the same error in a project which was working perfect before updating VS2013 and finally after 3 hours looking for the source of the error I found that the error is about TargetFrameworkProfile.
In my case I sloved it like so:
Right click in the unloaded project in your solution and click Edit.
Find the TargetFrameworkProfile tag and set it as below:
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
At a guess, this is because you need to specify the TargetFrameworkVersion and TargetFrameworkProfile properties in the project file. Compare the .csproj you are trying to create to a newly created PCL project file, and make sure that everything that's not specific to your project matches.
I ran into the same issue and got it resolved by installing the latest Visual Studio Update

The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly

After installing Slow Cheeath (v. 2.5.10.3) to two projects in my solution, I am receiving the following error:
"The "SlowCheetah.Xdt.TransformXml" task could not be loaded from the assembly C:\Users
\User\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll. Could
not load file or assembly 'file:///C:\Users\User\AppData\Local\Microsoft\MSBuild
\SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll' or one of its dependencies. The system cannot
find the file specified. Confirm that the <UsingTask> declaration is correct, that the
assembly and all its dependencies are available, and that the task contains a public
class that implements Microsoft.Build.Framework.ITask. ISA.IMPD.FalseAlarm.Web.Portal"
I have removed both projects in their entirety (along with Slow Cheetah), re-installed both projects (along with Slow Cheetah), and Rebuilt the solution to no avail. Can anyone help with this type of error?
In my case the error occured while compiling a web project. The folder
%userprofile%\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2
was empty. All the SlowCheetah components were in SlowCheetah\v1 folder instead. I've copied all files from V1 folder to v2.5.10.2 and everything compiled and transformed fine. To make non web projects compile, I also had to delete V1 folder as suggested by Whoever in this thread.
This was a brand new installation of the SlowCheetah Extension and I did not expect the v1 folder to exist at all. I believe this was a bug in the extension installation for Visual Studio 2012.
delete
AppData\Local\Microsoft\MSBuild\SlowCheetah\v1
I seem to have found to solution to this problem.
Here's what I did:
You need to close Visual Studio, then navigate to:
C:\Users\username\AppData\Local\Microsoft\VisualStudio\11.0\Extensions
Delete the cache file that has the latest date and time
Open Visual Studio and remove Slow Cheetah from the Solution level
Re-install Slow Cheetah from the solution level to the desired projects.
This was failing on our build server, so I changed the revision number from:
<sc-MSBuildLibPathLocal Condition=" '$(sc-MSBuildLibPathLocal)'=='' ">$(LocalAppData)\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\</sc-MSBuildLibPathLocal>
To:
<sc-MSBuildLibPathLocal Condition=" '$(sc-MSBuildLibPathLocal)'=='' ">$(LocalAppData)\Microsoft\MSBuild\SlowCheetah\v2.5.10.3\</sc-MSBuildLibPathLocal>
Why it was pointed to v2.5.10.2 is a mystery, but I'm definitely using v2.5.10.3! Looks like the nuget package itself has the bug in it.
I resolved it like this:
Uninstall slowcheetah => Tools>Extensions and Updates
click OK when VS asks you to restart VS.
in "C:\Users\AppData\Local\Microsoft\MSBuild\SlowCheetah" remove the 'v1' folder (which windows automatically creates when restarting your VS) (here be dragons..)
reïnstall slowcheetah (see step 1) => a new folder v2.5.10.2 will be created.
Again, click OK when he asks to restart
Build your solution
Regards,
Peter
This problem went away for me after using the preview transformation feature in the context menu. Originally suggested here.
FYI this was on VS 2010 Premium.
Having multiple versions can lead to conflicts.
In my case I have installed both Microsoft.VisualStudio.SlowCheetah by Microsoft and SlowCheetah by Sayed Ibrahim Hashimi. After uninstalling the package from Microsoft everything went well.
I have deleted the old files in C:\Users\\AppData\Local\Microsoft\MSBuild\SlowCheetah\v1. I also needed to upgrade Visual Studio 2012 to update 4 to make it work.
I was able to fix this issue by doing the following:
Uninstalling the SlowCheetah extension from the TOOLS > Extensions and Updates... menu
Closing Visual Studio
Deleting all files in the "C:\Users\username\AppData\Local\Microsoft\VisualStudio\11.0\Extensions" folder
Opening Visual Studio
Reinstalling SlowCheetah from the TOOLS > Extensions and Updates... menu (which requires a Visual Studio restart)
This is using Visual Studio 2012 Premium with Update 4 and SlowCheetah version 2.5.10.
If you're getting this error on a TFS Build Server (in my case TFS Express 2013) then you will need to copy over the files from your local machine
C:\Users\SWEAVER\AppData\local\Microsoft\MSBuild\SlowCheetah
on your machine to whichever user your TFS build is running under
C:\users\TFSBuild\AppData\Local\Microsoft\MSBuild\SlowCheetah
Please note AppData is a hidden directory that you may not see, but just type the name and hit enter and it will come up.
I'm using VS2013 so I didn't copy v1 (I think v1 is for VS2012).
The original TFS error I got was :
C:\Builds\1\www.XXXXX.com\RRStore - XXXXX
Silverlight\Sources\RRStore.AdminConsole\Properties\SlowCheetah\SlowCheetah.Transforms.targets
(150): The "SlowCheetah.Xdt.TransformXml" task could not be loaded
from the assembly
C:\Users\TFSBuild\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll.
Could not load file or assembly
'file:///C:\Users\TFSBuild\AppData\Local\Microsoft\MSBuild\SlowCheetah\v2.5.10.2\SlowCheetah.Xdt.dll'
or one of its dependencies. The system cannot find the file specified.
Confirm that the declaration is correct, that the assembly
and all its dependencies are available, and that the task contains a
public class that implements Microsoft.Build.Framework.ITask.
Fortunately this error told me exactly where to place the files.
I had the same problem in Visual Studio 2013. Just install SlowCheetah NuGet package:
https://www.nuget.org/packages/SlowCheetah
They've released a new version which brings the installation procedure up to date:
https://blogs.msdn.microsoft.com/visualstudio/2017/05/25/whats-new-and-improved-with-the-slowcheetah-extension/
Tired of having to install your NuGet packages manually to get
SlowCheetah to work? We’ve added automatic NuGet installation to help
streamline your process. All you need to install is the latest
extension and SlowCheetah will take care of the rest. When you use
SlowCheetah for the first time in a project, it will prompt you to
install or update NuGet packages. Agree and you’re ready to go!
Close Visual Studio
Install the VISX extension
Open your project.
This version detects if you already have it installed and offers to upgrade.
I would recommend checking in to source control and then doing a compare of your .csproj file to see what changes it made.

Resources