VS2017 not showing Report Viewer in prerequisites - visual-studio-2017

I am trying to deploy a wpf application with an embedded rdlc report using clickonce. The previous version of report viewer (in VS2015) was built-in so it was easy and convenient to use and I had no issues deploying this project.
Now since easy and convenient is not the goal anymore, in vs2017 after a failed deploy with an error message that gave me absolutely no help, I have come to realize that apparently you have to install 2 additional VS extensions and a report viewer runtime on every machine where an app uses and rdlc reports (feels like crystal reports all over again) and you have to exclude the automatically included Chinese localization files in your clickonce deployment (which cause a manifest parse error). Anyway, the instructions on MS website say that click once should have a "Microsoft Visual Studio Report Viewer" prerequisite option to select as requirement of installing your app. However, after installing the runtime on my development machine, restarting visual studio, this option is not available. Does anyone know how to get this to work?

I used Project|Manage NuGet Packages to add this package to my project.
https://www.nuget.org/packages/Microsoft.ReportViewer.Runtime.Common/12.0.2402.15
If you search with Manage NuGet Packages, there's quite a few ReportViewer related items. I'm not sure which ones are appropriate to your WPF app.
Anyway, the deployment project picked up the various ReportViewer assembly dependencies and everything seems to be working without the EXE redist from MS.

Related

Azure DevOps project build returning with log4net error

I'm trying to build a visual studio 2015 dot-net application which has log4net reference in the code.
When I build in Azure DevOps using Nuget restore, Nuget Tool installer, Visual studio build, Publish Build artifacts I am getting an error:
Error CS0246: The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?) Process 'msbuild.exe' exited with code '1'.
Please someone suggest whether I have to add another agent or make some reference to the package/nuget in Azure DevOps. need details since I'm new to Azure DevOps.
The error message suggests that either the using is missing or the assembly could not be found, meaning that probably the nuget restoration has failed.
If you can't figure out the issue by looking at the log, the first step should be to set system.debug to true, then you might get more info about what the issue might be.
My first instinct when I don't know what's going on would alsways be to look into the s folder of an agent but I don't have experience with hosted agents and as far as I know you cannot access the working folder of a hosted agent.
So as a workaround (only if everything else fails) I would suggest to zip the s folder ("$(Build.Sources)") or special parts of it into the a folder ("$(Build.Artefacts)") and publish that zip as an artefact. Then you can download it and look at it in great detail, e.g. look at the packages folder or open the solution and see why it doesn't compile.
Problem was partly solved as there was .gitignore and .gitattribute files in my source directory which i guess had entries to ignore the third party .dlls like log4net and several folders which were not getting checked-in when i did vsts push. But there arose some other errors in vsts build now which i am trying to figure out. I will create a new thread for that.
Thanks.
For some reason I lost ability to see it in
Tools -> Manage Nuget Packages for Solution
However from the docs
I used
Install-Package log4net
in Package Manager Console
That solved the issue.
Previously I had noticed the yellow triangle against log4net In Manage Packages For Solution, and may have tried removing it via Nuget.
However it was still showing as a reference

Do I need ODTforVS2017_122011.exe?

I have VS2017 and plan to do some C# development that needs to access Oracle 12c database.
I went in Oracle site and downloaded ODTforVS2017_122011.exe. The installation was successful.
But when I tried to declare my connection type OracleConnection, my project does not know it and I can not reference Oracle.ManagedDataAccess. I had to go to Nuget to install them to satisfy the compiler.
So, my curious question is: is the ODT installation from Oracle site necessary or Nuget installation only would suffice? I just do not want to install to much irrelevant stuff that I would not be able to justify.
I don't believe you need the tools, no. They're Visual Studio features, rather than tools needed at execution time.
From the download page:
Oracle Developer Tools for Visual Studio enables Visual Studio data features such as Server Explorer integration, TableAdapter Configuration Wizard and Entity Designer and also includes many useful Oracle specific tools.
So you may find it useful to have those tools, but I don't believe they're required on every machine where you want to either develop or deploy your application.

OpsHub v2.0.0.004 Template Mismatch on standard Scrum Process template

I've found a couple of similar questions on Stackoverflow, but the answers do not solve my issue. (For example the issue would be fixed in previous version. OpsHub TFS 2010 to Visual Studio Online)
Also I experience different behaviors on multiple environments so I think it's a new question. I hope someone can help me.
I have some projects on a TFS 2012 with the standard Scrum 2.2 template. I created a Visual Studio Team Services environment on my personal account for testing the migration. I created a project based on the default Scum process with the same name as the project in TFS. When I use the OpsHub tool (version 2.0.0.004) to migrate the work items to VSTS it works as expected.
screenshot of working migration
Now I create a new project on my companies VSTS environment with the same name and the same Scrum template. Apply the same rights, and try to migrate the same project to companies VSTS, validation fails with the message that "template customization or template mismatch". Details "Code Review Response - Reviewed By"
screenshot of failed validation
I exported the scrum process templates for both environments and compared the contents but they are identical.
So I have 1 project on TFS and 2 projects on VSTS with identical templates. One migration works, the other does not. I'm stuck. Any tips would be very welcome!
Thanx
I got an email from OpsHub with the solution! They released a new version (2.0.0.005) and after clearing the cache, it works! Thank you, OpsHub.
Refer this to download the latest version.
Perform following steps:
Close the OVSMU Tool if running.
Installed the latest version OVSMU-V2.0.0.005
Clear the following cache folder:
Close the OVSMU Tool as well as any instances of Visual Studio (ie. TFS related applications)
Clear the contents of the following folders (whichever ones you have)
%localappdata%/Microsoft/TeamFoundation/3.0/Cache
%localappdata%/Microsoft/TeamFoundation/4.0/Cache
%localappdata%/Microsoft/TeamFoundation/5.0/Cache
%localappdata%/Microsoft/TeamFoundation/6.0/Cache
Launch the newly installed OVSMU Tool & Configure the migration again.

Automated build installer using team foundation service

I have started using the preview of Microsoft Team Foundation Service (TFS in the cloud, henceforth TFService) for a small project, and I'm currently setting up builds using the online build service included with TFService.
What I want to do is to add an installer of some kind. I've previously worked with InstallShield Limited Edition, WIX and Inno Setup and would like to keep using one of those if possible.
I've previously integrated Inno Setup as part of a build process (TFS 2010). This involved installing Inno Setup on the build computer, and adding a custom build task for running an inno setup script. The last part should be possible with TFService as well, because it's possible to create custom build process templates.
However, I realize that installing anything such as Inno Setup or InstallShield will not work with TFService, since it's not possible to install any 3rd party software on the build computer (it's just a cloud service running on some unknown virtual computer which I cannot access).
So my question is; is there a way to automatically create an installer as part of a build process running on TFService? For example, is the build service capable of building installshield projects out of the box (there's a license included with Visual Studio after all)? Or are there other ways to do this?
I have some experience with this trying to get WiX and InstallShield to work with Microsoft TFS Preview cloud service using their managed build agents. On these agents, you don't have administrator rights and you can't install software.
This currently rules out InstallShield which must be installed.
It is however possible to check the WiX binaries into source control and pull them down as part of your build.
WiX uses .wixproj files (MSBuild) to define their project compile activities. This references a targets file and other properties ( referencing registry values ) that won't exist when you deploy this way. A small bit of hacking will get all of these properties to resolve to workable values.
The one problem you may still have though (and I'm thinking TFS managed build environment ) is that you may have to configure your projects to skip MSI ICE validation suites. On the build machines, I played on the windows installer service was outright disabled and this prevented the tests from running.

VC++ application doesn't run on other machines due to "incorrect configuration error"

I know that this topic has been posted over a dozen times, but I wasn't able to find a topic that fit my issue so I will post all detail below.
To start I will mention that I have two projects: The first is the main application and the second is a DLL. The project was due for a major revision and needed a DLL to be replaced due to the company I work in switching vendors. After creating the DLL needed to import into the project I was successfully able to test and run on my machine as well as other developers machines. However once I tried to deploy it on our barebones testing machine I got the error stating that the application configuration is incorrect.
Seeing as I've seen this error before I tried to install the vcredist but I got the same error message. I tried using dependecywalker to see if I had all my needed files for the application to run to which it stated that I was missing MSVCP80.DLL, MSVCR80.DLL, and MSVCR90.DLL. Seeing as running the vcredist didn't help I tried to create a msi installer. Once I deployed that I got the application to run, but at the same time it didn't. The application needs to load in configuration files to be able to run properly otherwise it is not able to connect to our database.
I was wondering if anyone had any advice on how I can include the needed policies/dependencies in order to get this project to be able to run successfully.
To sum it up:
Release application is able to run on other developer machines and
able to load all proper configuration files, but cannot be run on any
bare bone or test machines.
Application created from Visual Studio Installer is able to run, but
ignores the configuration file directory and tries to load in default
directories.
Project is built using VS2005 C++.
Any help would be greatly appreciated.
Thanks,
Sebastian
There are different versions of redist regarding the VS service pack. So make sure, that if you have installed the VS2005 with service pack 1 you provide the redist for VS2005 service pack 1.
You might have gotten the ATL security update on your build machine but not the target.