Migrate model from a VS 2015 to VS 2010 - codefluent

I initially created the Codefluent project for Visual Studio 2015 but now need to drop it down to Visual Studio 2010. The documentation states that an existing database or model can be imported. It's not clear what is meant by importing an existing model. I assumed the import wizard would give me an option to specify the .cfp file (which is essentialy my model) that I created in Visual Studio 2015. I don't see any such option. The only import option I see is to specify the connection string to the database and then specify the tables.
Questions:
Is there a way to do an import by specifying the .cfp instead of the database and tables to be imported?
If there is no import option on the .cfp file, I'll probably manually copy and paste the contents of the .cfp from the VS2015 project into .cfp file of the VS2010 project. Does that seem like a good solution?

Related

BIML Studio vs Visual Studio

We are creating a new data warehouse using SSIS and are looking at BIML Studio. I know that for BIML Express I need Visual Studio, but for BIML Studio it seems that we don't even need Visual Studio if we develop our entire ETL with BIML Studio. Is this correct or do I still need Visual Studio in some way?
Standard consulting answer: "It depends"
Your BimlStudio workflow is probably going to be a few BimlScript files that contain your core logic. And then there's gonna be the generated artifacts. As an example, here's shot of the Logical view of my current Biml project. It's a large and still growing "export procs to fixed width files" solution for a client.
Since I need to write to a flat file, that means each package needs a Flat File Connection Manager and a Flat File Connection Manager needs a Flat File Format definition. So, 1 logical entity requires 3 Biml artifacts (at least for how I'm building it)
What you see in the BimlScripts and Connections folder are what run the project (plus the custom metadata repository aka "one big table").
The black circle next to 01_FFF.biml means that's a "live" Biml so every time I make a change to my metadata or the underlying file, whoosh out comes 45 File Format entries (project view)
All of this is great but eventually, I need to translate what's in my Integration Services node (1 project, 45 Packages) into a deliverable.
What's your deliverable?
Right clicking on the project gives me 3 options: Build, Build & Run, Build and & Open in SSDT
Build - this results in a .ispac file being created. That's the quantum for pushing a project deployment model into the SSISDB
Build & Run - Honestly, I don't know what this option does. I should check the book https://link.springer.com/book/10.1007/978-1-4842-3135-7
Build & Open in SSDT - This results in everything you need to interact with the project in Visual Studio (a .dtproj file, Project.params, any Project level .conmgr files and all the associated .dtsx files)
When would I need Visual Studio?
Debugging. I'm pretty good at this stuff but even I miss some settings for things I don't have solid patterns for. For example, this project is using Fixed Width File Formats and in early iterations, I was getting defects open as the files weren't correct because the default file encoding was for Unicode, despite each individual column being defined as DT_STR (non-unicode). Little stuff like that is much easier to find and resolve and fix back in BimlStudio. Otherwise, you're trying to debug the results of a package execution but if you knew you had the wrong pattern, you wouldn't have built the bug into your pattern.

How to run custom tool from VS2022 extension?

I'm developing a Visual Studio 2022 extension with the Visual Studio Community Toolkit. The extension modifies some resx files and I'd like to run the associated custom tool to regenerate the corresponding *.Designer.cs file after a resx file is modified.
In another extension for a previous VS version, I was able to do it like this:
ProjectItem item = _dte.Solution.FindProjectItem(filename);
VSProjectItem vSProjectItem = item?.Object as VSProjectItem;
vSProjectItem?.RunCustomTool();
With _dte being of type EnvDTE._DTE. However now I can't find a way to get that _dte object. All I have is an static VS that provides some basic features as the ones described here: https://learn.microsoft.com/en-us/visualstudio/extensibility/vsix/tips/files?view=vs-2022
However, I can't find there anything related to running a file's custom tool.

Updating database to Migration Configuration

I have pulled down a Visual Studio 2015 project created my another developer. Within the Migrations folder are several Migration Configuration files ...
201601081315335_AddedPersonEntities.cs
201601091532275_AddedDepartmentEntities.cs
201601101145137_AddedPayrollEntities.cs
I would like to update my database to the point of one of these Migration Configurations. However when I try this command ...
Update-Database -Verbose -StartupProjectName MyApp.Api -ProjectName MyApp.Data -ConfigurationTypeName 201601091532275_AddedDepartmentEntities.cs
I get the following error ...
The migrations configuration type '201601091532275_AddedDepartmentEntities' was not be found in the assembly 'MyApp.Data'.
I was expecting it would bring my database up to the same schema at the point that 201601091532275_AddedDepartmentEntities was created. Am I missing something?
Go to visual studio, select your MyApp.Data and check the "Show All Files".
Inside the migrations folder, see if there aren't migrations "outside" the project. If there is, then add them to the project with Right-Click > Include in project.
Do you use TFS?
It happens when you add something (File/Folder) inside a project in your solution and check-in your solution, and your colleague doesn't do correctly the merge on the .csproj file (Which contains all the information about the files and folders inside the project).
WAIT
Ok i think this isn't the problem.
You are specifying -ConfigurationTypeName: don't you want -target: instead?
-ConfigurationTypeName Is used to define the configuration class (Normally contains the seed method).
-target Specifies to where you want to update your database (From the current migration to that specific one, forward or backwards it works anyway).
And, do you insert the models inside MyApp.Data or MyApp.Models?

Is it possible to import Visual Studio Power Tools settings?

Recently I've upgraded from VS2013 to VS2015. I've imported my settings file from 13 to 15. Now I would like to import my settings for the extension 'Visual Studio Power Tools'. Specifically the document well regex settings. I use this to color my tabs differently in each of my three environments, for each of the file types. I was able to find where these settings are stored thanks to this question:
Visual Studio Productivity Power Tools configuration settings
I've located these settings, but now my question is: how do I import them into VS2015? I'm not very experienced messing with the registry and don't want to muck something up. So far I was able to export the specific reg settings for my VS2013 colors. I also found the location of the color settings folder (in the registry) for vs2015. Is it possible to somehow take that .reg file I exported and import it into the settings for vs2015? Thanks for any help. It's greatly appreciated!
Edit: So it's been a week or so and I've gotten no responses to the question :(
I suppose another way to ask this would be: "is there a way to import registry settings?"
In Visual Studio 2015 those settings are stored under a registry key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\DialogPage
Assuming that the plugin didn't change the way its color settings are stored, it should be enough to edit the .reg file that you exported from Visual Studio 2013 in a chosen text editor (notepad.exe will do) and replace all ocurrences of \12.0\ (which is version number of VS2013) with \14.0\ (which is version number of VS2015).
Then you may open the .reg file to import settings.
By the way, if you would like to include registry settings like this in your backup plan, you might easily export registry keys from a command line with something like:
regedit /e d:\VSPowerToolsColorSettingsBackup.reg "HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\DialogPage"

How to Import/Export live code template in android studio?

In Eclipse there is simply option to import or export code template. I want to do same in android studio but there is not any direction option to do so.
I have create one template and now i want to apply it to all my other system so i need to export & import.
I have one option to do but i just want to know that is any other way to do.
Create your code template file in eclipse and export.
Exported file will be XML.
Now copy that XML file and move to ..//.AndroidStudio/config/templates
Restart Studio and Use it.
Can you please help me out.
Thanks for your time.
System-independent solution:
Go to File -> Export Settings, choose only Live templates, and export it to a file.
Then you can use File -> Import Settings and provide this file to import live templates.
(I haven't tested it myself so I'm not sure how exactly the Import Settings works. I don't know if it merges the settings with your current ones or swaps it entirely. Bare that in mind when trying...)
System-specific solutions:
Mac OS:
Go to /Users/<username>/Library/AndroidStudioX.X/templates/.
There's where user.xml file containing your Live Templates should be.
Linux:
The templates are saved inside ~/.AndroidStudioX.X/config/templates/Android.xml