I feel embarrassed asking this here, but I was wondering if anyone could help me quickly, the Microsoft documentation around this is actually quite poor.
Microsoft host what appears to be a very neat framework on codeplex that helps you build MVVM WPF applications, and has samples illustrating much of the MVVM principles and the supporting code base they offer. It's called WPF Application Framework and you can download it here.
I downloaded the framework and its samples, as well as the documentation for the sample i'm interested in (WPF EmailClient), but I'm having trouble running the sample.
This is a picture of the documentation:
As you can see, it tells you to simply set the EmailClient.Presentation project as the startup project and run.
However
This project is in fact a Class Library, and cannot be set as a startup project.
I turned it into a Windows Application, but it needs an App.xaml file, and the whole project seems to use MEF as an IoC container and dependency injects all the views and ViewModels dependencies.
All this means a lot of work for me to launch this project, and I was just wondering if any of you out there know how you are supposed to do this.
Oh yea and I'm running windows 8 and VS2012, but I really don't think that has anything to do with it. (The project is targeting .Net 4 anyway)
Interesting framework.
The application for the overarching "InformationManager" sample is a project called "Assembler"
You'll need to set this as the startup project. Make sure you do a full build of the entire solution before you run it, otherwise you'll get an xaml parse exception in app.xaml.
By changing the project type you broke the solution. Download the example again and open the solution in Visual Studio. Next right click on the project you run and select Set as Startup Project.
Then when you press F5 it'll launch that application, not the class library.
Related
I have a local Web Application which's backend is written in C# with Visual Studio. Now I decided to use a source administration tool for it. My problem is, that I'm really confused how to migrate my solution into GitLab. In my opinion there is one solution and 6-8 projects in this solution. So I wanna try to create for each project a git repository. The only problem is, that if I'm cloning my projects they won't find the dependencies. What is the right way to check in everything, organize it right and get rid of dependencies problems?
In the moment I created a git subgroup "MYAPP" and added all angular frontend applications. I made one repo for every application. Now I want to add the c# projects which are containing the logic. These are devided in 5 projects and a core project which handles the entityframework.
I hope to get some good advices and best practices.
Sorry for my bad english and thanks to everyone who tries to help.
You should consider carefully if you want to separate each project into a single repository. If your projects are only used as part of your solution and you never want to use them anywhere else as standalone modules or libraries, it's perfectly fine to put the whole solution and all projects in a single git repository.
If, on the other hand, you use or publish your projects as libraries, you can totally manage them as separate repositories. In this case, you would need a repository for your solution that includes your subrepositories as submodules or subtrees.
Managing subrepositories, however, always comes with a certain overhead. I would advise to avoid it if it isn't justified (i.e. if at this point in time your solution is the only one using your projects).
I've written an MVC core app. The next step is to wrap it in an MSI and distribute it to clients. The problem is this: I can't seem to find any built in way capture all the content files and dll's automatically and wrap them in an MSI. I've tried so far windows installer and wix (heat, to be precise) and both of them doesn't seem to have a built in way to work with .net core. Did Microsoft just decided it's not important enough or am I missing something important? I could try to put all the output and all the dependencies, file by file, but that would be hell to maintain, with the new Nuget approach there are many many dll's required for a project, together with all the content it becomes enormous. Any help would be appreciated
I'm still adjusting to this "modern" world and part of me wonders why you'd want to package a .NET core app as an MSI. I'd think you'd be running it in a docker container or windows server app (appx) in the "cloud" or on nano server which doesn't even support MSI. For actual windows servers I'd assume regular old .NET. (Which I still fondly love.)
That said, I have an open source program called IsWiX (CodePlex) and have a very simple pattern for creating ASP.NET website installers (see video at: https://www.youtube.com/watch?v=pgDf1kv8a-4) and I'd be willing to work with you to come up with a similiar story for asp.net-core mvc apps.
From what I read, .net core apps also have msbuild publish profile support. That is what I use to create the model from which I author my installers. From there I just drag drop my files into IsWiX and let it author all the XML for me.
FWIW website installers have always had a lot of files. Even before nuget and npm a website developer might add a few thousand files to their project just by adding say Infragistics. I once worked on an installer with over 300,000 files. Yikes! I always wished we had a way of just creating an uncompresssed archive of this stuff and IIS could see if as a directory but to my knowledge that never happened.
The MSI world is a declarative world where we need to explicitly list each of those files. Web developers live in a world where they just say "publish" and don't care about those details. That is the gap that I try to bridge with IsWiX.
I am trying to automate a Silverlight web application using CodedUI. The application under test is already developed and deployed in our testing environment.
I tried automating using record feature of CodedUI but was unsuccessful in getting the recorded actions. On googling, I found that I have to install this plugin: https://visualstudiogallery.msdn.microsoft.com/28312a61-9451-451a-990c-c9929b751eb4
I did the installation and still was unable to record. Then I found that I have to reference Microsoft.VisualStudio.TestTools.UITest.Extension.SilverlightUIAutomationHelper.dll file in the Silverlight project.
This is where I am stuck. I am not sure whether to reference this file in :
The project which was used to develop the Silverlight application
The CodedUI test project.
If it is option 1, I don't have access to the development project. Is there any workaround for this ?
I am pretty sure you only have to reference it in the Coded UI test project. This is how I do it with the DevExpress.CodedUIExtension helper DLL.
Personally I would put the test code next to the application code though, when you version the tests with the application this will make it possible to run tests against a previous and or branched version.
Yes,You need to Refer the AutomationHelper.dll in The project which was used to develop the Silverlight application. I was having same issue way back refering to dll will solve the purpose.
In addition you can refer it with flag to make sure this will not go to production which is a best practice.
I've created a WPF project using MVVM pattern and another project for a web service.
In my WPF project, i've some views and I can navigate between them, everything works.
Now, I want to create a setup with InstallShield, I add project outputs, etc... but when I install the application, the buttons in the main view are not working as if the viewmodels were not include in the setup.
Any ideas ?
Thanks.
Where your installation does not give you the correct results, ask yourself the following questions. Move to the next if you answered 'yes'. If no, then that is a good starting point for your investigation:
Does it work in Release mode on your development PC?
Did the installed application load?
Are all your project outputs present in the installation directory?
Are all the installed files the right version?
Are your configuration files valid?
Have the correct version of the dependencies been installed? (.net version, etc)
I inherited a software engineering job with a .DBML project in it. It was being referenced by an ASP.Net website as it's data access layer, but I'm tasked with creating a Console app that could utilize the extensive data access classes in the project.
However, when I reference the project I get intellisense and all but on building it, get errors as if I don't have reference to it.
I am not that familiar with this kind of project and am kind of at a lost how to proceed. I have been trying out different stuffs for past few hours, but nothing seems to work.
Can anyone guide me to how to solve this, or perhaps an article that could point me to the right direction? Thanks!
Right click on your console application and then click on properties. Change the target framework from .Net Framework Client Profile to .NET Framework.
This "feature" of Visual Studio has bitten a lot of people... I wasted almost a full day on it recently.