How to I set the full path of a report in Visual Studio 2022? - report

I have recently upgraded from Visual Studio 2012 (which I have used for a long time) to Visual Studio 2022. For my job, I primarily use Visual Studio for the creation and modification of SSRS reports (RDL files).
The way my team and I have been doing this has been to have the projects in the standard path (under My Documents, \Visual Studio 2012\Projects\ {project name}). The report files (RDLs) are, however, stored in a GIT repository in another folder all together. This was easy enough to accommodate by using the Full Path parameter in the .rptProj file.
For example, one of the reports might have an entry that looks like this:
<ProjectItem>
<Name>myReport.rdl</Name>
<FullPath>D:\git\repository\reports\group\myReport.rdl</FullPath>
</ProjectItem>
Then, when I open the report project, I can see that I have a report called myReport in the reports section of the Solution Explorer. If I check the properties, I see a File Name of myReport and a Full Path of D:\git\repository\reports\group\myReport.rdl. Perfect!
However, after opening the project with Visual Studio 2022, it converts the .rptProj file to a new format. In this format, there does not appear to be a Full Path parameter. The entry is simply:
<ItemGroup>
<Report Include="myReport.rdl" />
</ItemGroup>
Thus, there is no Full Path that can be entered. When I check the properties I see a File Name of myReport and a Full Path (which I cannot edit) that is that of the project itself. Since there is no such file, it shows that this file is missing as well.
I can, it turns out, put the full path in the Include argument. This makes for an interesting situation where the display in the Solution Explorer is the full path the file (which, in the actual project, is a bit long to be displayed there in a reasonable amount of screen real estate). In the properties, the File Name and the Full Path are the same -- that whole file path. If I attempt to change the File Name, it gives a strange error where it states it cannot find the file at a path that is the entire file path concatenated onto the end of the entire path (e.g., D:\git\repository\reports\group\D:\git\repository\reports\group\myReport.rdl).
Now... this is no emergency or anything. I can work with the idea that the Solution Explorer will show the whole path if I have to. But... I much preferred the way this worked prior (in Visual Studio 2012). Does anyone know of a way to structure the information in the .rptProj file to accomplish this?

Related

Exporting entire project in Visual Studio 15

I need to send off this project I've been working on via email so I'd like to just zip up the project folder and send it off. I've done this in previous version of VS with no problem but with Visual studio 15 the project folder only contains the solution file a .vs folder and a packages folder. None of the actual files are included i.e default.aspx and so on.. If I try to zip up this folder and send it off it doesn't open on the other end. I've tried exporting as a template but that didn't really work because it doesn't contain the solution file. Is there any easy way to just export the entire project so that it can be easily opened by another user on a different computer (They need to be able to see each individual file in the solution basically how you see it in the solution explorer)?
I use CleanProject for this, amazingly, it still does a fantastic job with my VS2015 projects. It cleans (removes bin/, obj/ etc) and then creates a minimum zipfile.
You can download it here:
https://visualstudiogallery.msdn.microsoft.com/bca632e0-3948-43c8-b337-da47275717b6
It does not work from VS2015, but from the file explorer. If that doesen't freak you out, it's a great timesaver for those situations :)

Visual Studio - One click publish files outside of the website root

I'm trying to publish files that are unrelated to the solution as part of a one-click publish job.
This would be relatively standard, similar to what is outlined here and here too.
However, the files themselves need to reside one folder above the actual root of the website.
If I try to specify a relative path outside of the website directory, such as <DestinationRelativePath>..\Data\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath> this just results in the publish skipping the item, since it claims it is up to date (in reality there isn't anything there so it can't be up to date).
I've had a quick look and can't find a way to specify an absolute path, is this something that would be possible, or is there a better approach to take here?
As part of the properties of the file you want to copy you can set it to be "Copy Always" this could resolve the issue if it is just a date issue.

How to provide a converter that shows up in Convert dialog

Visual Studio 2010 (and newer versions) has the Convert command in the File > Open menu. I assume this is the right place where custom project converters should be integrated into the IDE.
This menu command shows a dialog where the user can select a converter...
I would like to know how a package can provide a converter, that shows up in that dialog.
It's not documented IMHO (at least I can't find it anywhere). It's based on the content of a file called convert.dir located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE (for Visual Studio 2010). This file may not exist or its size may be 0.
When defined, it contains a list of lines, each line corresponding to a converter. The line format is 5 values separated by the '|' character, like this;
relative path to .vsz|relative icon path|localized name|localized description|priority
As an exemple, in my old Visual Studio 2008 installation, here is the content of Convert.dir:
vsz\VJToCSharp.vsz|images\VJToCSharp.bmp|#VJMigrationWizard.VJMigrationWizard,MWZ_ConverterName|#VJMigrationWizard.VJMigrationWizard,MWZ_ConverterDescription|1
vsz\vb6tovb7.vsz|images\VB6ToVB7.bmp|#MigrationWizard.MigrationWizard,MWZ_ConverterName|#MigrationWizard.MigrationWizard,MWZ_ConverterDescription|1
The .vsz file is a standard Visual Studio wizard file.

Updating a source file in referenced project assembly in VS2012 -a bug?

In a web site I have a reference to a class library assembly. When I add something to the source code and build the solution the update does not reflect to the bin folder of the web site. I first thought dll refresh did not work so that the dll in my bin folder was not updated to the latest version. But then I found two things that seem weird:
I have a public struct inside which are number of public const string fields. If I change the name of any of those fields and build solution, the change does not get reflected on the web site side. However if I select that field name, right click on it and choose "Rename oldname to newname" and then build, it works.
When I add another public const string field and build the solution, the update does not get reflected.
Is this a know bug with VS2012 or is this an intended feature? I can understand the first case. But the second case absolutely seems to be a bug and there's nothing like intended feature. I wanted to check with SO before reporting this to VS team as a bug.
I did not use to have this problem with Visual Studio 2010 ultimate. The current one I'm using is Visual Studio 2012 Ultimate
This definitely seems to be a bug. I've already reported this to Visual Studio team. But for the ones who suffer from this bug I have a solution until the bug is fixed.
Remove the reference from the bin folder. (x.dll, x.pdb, x.dll.refresh and x.XML files where x is the name of the referenced project.)
Select your web site or project, right click and click Add reference
This is the part that made a difference. On the left pane select Solution||Projects. Click Browse at the lower right side of the window if the project you want to reference is not in the list on the middle pane and navigate to that project, it'll come to the list. Check the box and click OK. I used to select Browse (not Solution||Projects) and reference directly the dll file. What you will notice with the first (working) option is x.dll.refresh file is missing. I know it sounds weird but I don't know how and why the referenced dll is updated when this file is missing.

Can I specify which cultures to use when generating local resource files?

I am working on a website that is English by default and optionally in Spanish. I am generating local resource files for each page with language appropriate content for various items.
So far to create my pair of resource files (default and Spanish) for each page, visual studio 2010 generates the first file like default.aspx.resx. I create the Spanish version manually by copying the default file and renaming to default.aspx.es.resx.
Is there a way to have visual studio generate both files for me? I can generate the default file, add controls to the page, and generate again and visual studio is smart to not blow away any work I've done in that file. I would like to be able to also update the Spanish resource file automatically.
There is no tool in Visual Studio (at least I haven't found one when researching the same request), and we dropped the idea of writing smart macros for that purpose that parse resx files and modify other based on changes.
There is, however, a decent free tool that supports creating and aligning resources: Zeta Resource Editor.
You can add files and entries on click, and editing resources is much nicer than in Visual Studio, in addition to quite a few other useful features.

Resources