How to create custom project that inherits from c# using MPF? - c#

Using Visual Studio's Managed Package Framework, how can I inherit from C# so I can have C# property pages and C# project items? I've tried making a flavored project, but it was limited in terms of making our own custom nodes and custom file properties. When using the MPF, however, I cannot seem to obtain those C# properties that were provided with the flavored project.
Thank you

after a long week and a half, I was finally given a solution by an employee at Microsoft:
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/bfe5d211-c626-43ff-9096-c75023a76ca5
Hope this helps everyone who has upvoted/favorited this question...

Related

Add Windows.Data.Pdf dependency in C#

I need to use this .NET class for one project I am working in (It's my first C# Project, I normally work in C++) https://learn.microsoft.com/en-us/uwp/api/windows.data.pdf.pdfdocument?view=winrt-20348
Unfortunately this namespace Windows.Data.Pdf is not available in my project and I can't find in the docu the dll name I have to link to, to be able to access the class. Does anybody knows which dll do I need?
Thank you in advance

Self-built C# Library not found

I have an issue including a self-built library to a C#-project. I have created an own class library called ClassLibrary1 just to learn how to add libraries on Visual Studio 2019.
So I have written some simple code in a newly created .NET-class library project and have clicked on "create new solution" (directly translated from my german IDE-language. Maybe it's called slightly different) after writing the code. Back in the C#-project, I have selected the dll-file from bin/Debug/ of the class library's project folder.
After I have set the checkmark, the dll-file was shown in the solution-explorer under Assemblys like expected. But the issue I now have is that I still cannot use the ClassLibrary1.dll-file in the cs-file in this very project as I expected via the command "using ClassLibrary1;". It only shows me the error message "type- or namespacename "ClassLibrary1" not found" when trying to compile the C#-project and I don't get, why this is the case.
It seems like it has to be a very obvious problem but after some research on the internet and trying some things by myself still nothing has changed.
Thanks in advance for helpful replies.
The by far easiest way to manage a library is to use project references. Ensure that your library and the project that uses the library is in the same solution. Then right click the "references" and select "add Reference", go to the project tab and add a checkbox for the library. Read more about managing references.
You might also need to add namespaces for the classes you wish to use in the source files.
I would not recommend managing using file-references to lose dll-files, since it can easily become a hassle to manage. I.e. if you create a new version of the library you would need to build, and explicitly replace this file in all other projects and update all the references.
If you want to share libraries between multiple solutions the more popular solution would be to setup a nuget server. This solves some of the updating problems by maintaining multiple versions of the same library, and provides a nice interface to update references in all projects. But this is a somewhat more complicated solution, so I would not recommend this for new developers.

How to share code and resources between projects

I have two projects named Project 1 and Project 2. I am porting my application from iOS to WP8 and I have ported my iOS_Project 1 to WP8_Project 1. In iOS I have the flexibility to add the files as references and thereby I can achieve code reuse. I would like to perform the same process in WP8, but I couldn't find proper help and here's the question. (Here I want to refer all the classes, images and xaml files like MainPage.xaml)
I know pretty sure about one thing that wpf/forms/.NET projects differ with WP8 structure. Please do provide some help.
Thanks.
When you have add your item to one project, select the option to Add Existing Item to the other project. Navigate to the item you want to add and then you should find a drop-down arrow on the appropriate button to allow you to add the item as a link. That means that there will only ever be one copy of that item but it will be used in both projects.That said, if possible, I would suggest that you break the common functionality out into a library project that you then reference in both the other projects. If you create a portable library then you could use it in a Windows 8 app as well.
You can use references in Visual Studio 2012 - there is no problem. However, PCL (Portable Class Library) is a better solution. Here is example how to add files as link in Visual Studio 2012.

Enterprise Architect: How do I add my included assemblies (C# .NET 4) so I can use them?

I'm using Enterprise Architect 9.0.904. I created a new project and it has a section in the Class Models labeled "Frameworks" and a note beside it stating:
Class libraries, APIs and other
re-usable components
Yet, it isn't really intuitive on how I can put my dll files I plan to use in the project in there. Anyone know how?
If you're after getting a UML representation of the contents of an existing DLL, then you do that by selecting "Import Binary Module" under the Code Engineering menu.
If you just need to describe the execution environment of your code, that's best done in a deployment diagram.

Type 'xxx' is not defined, BC30002 error

It is possible to create an instance of a C# class within a aspx.vb codebehind file?
When I try this within the Page_Load event:
Dim oFlow As New Flow(HttpContext.Current.Request)
I get the Type 'Flow' is not defined. The Flow class itself is located here:
App_Code/CSCode/Cust/Frm/Flow.cs
There's no namespace associated with this class.
Any suggestions would be greatly appreciated.
cheers,
devin
There seems to be a few articles on google which say that it is possible to call a C# class from VB directly using a reference. However I have never used this method before. Here is what I would suggest:
Create a new project inside of your solution
Create this project as a c# class library
Compile that project either in debug or release (this will create a .dll in the projects debug/bin or release/bin folder).
Go back to your ASP.Net VB project and make a reference (right click the project in the explorer and your should see the reference option) to the DLL you just created.
Now you can call the c# code just as you would any other class library from your VB code. Also, if you need to make changes to the C# code all you have to do is make them, compile again, and since it is referenced in your VB project everything will be updated auto-magically.
Hope this helps.
Thanks for the response.
The reason why I was having issues is because I'm using IIS 6 on my windows xp box along with the XP PRO IIS Admin Tool and I didn't have the correct site running.
Once I switched over to the proper site within the XP PRO IIS Admin Tool and then recompiled, I was able to call my C# class from within the .vb page without a hitch and intellisense recoginized the class as well :)
cheers,
devin

Categories