How do I build a specific dtproj file within a solution? - ssis

I have a solution full of SSIS projects, and I'm trying to build a single one via command line. I know I need to use the devenv.com executable, and if I use devenv.com solution.sln /Rebuild it will process the whole set of projects. However, I cannot seem to get the additional parameters correct. When I try devenv.com solution.sln /Rebuild "Development" /Project "projname", I get an enigmatic The operation could not be completed. The parameter is incorrect. Which parameter? What should it be? I've tried replicating this answer's syntax, but I get the same error. How do I find out what parameter is incorrect? So far the closest I can get is to rename the .sln file so it can't be found and just specify the .dtproj file.

Related

Msbuild running in Jenkins target calling HgPull fails with HgProcessException: The command <hg.exe> is not available

I am porting over an MSBuild script from CCnet to run in Jenkins. The MSBuild project is used to create a deployment package. I would rather have Jenkins drive this process itself but that's a longer term aim.
The problem i am having is (as in the title) when we try and use the HgPull target, from the MSBuild mecurial task (http://msbuildhg.codeplex.com/) we get the error message
HgProcessException: The command hg.exe is not available [Path to project]
I have seen on the project web site that someone solved it by adding the LibraryLocation proeprty to the target but that seems to have made no difference. My target currently looks like this:
Target Name="UpdateSources">
<HgPull
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Force="true"
Update="true"
LocalPath="$(SourcePath)"
/>
<HgUpdate
LibraryLocation="C:\Program Files\TortoiseHg\hg.exe"
Clean="true"
LocalPath="$(SourcePath)"
/>
I'm rather at a loss. Please let me know if you need any more information added to this post to solve this issue. I'm really quite new to MSBuild so really not sure where to start investigating this.
EDIT:
One thing i forgot to mention was that i have tried running the MSbuild command in a console window on the build server and still get the same result. This is really odd given it works fine in CCNet, what magic is CCNet doing to make this command work?
This is now resolved, unfortunately i'm not sure what changes i made to correct these. I believe it may have been down to path separators and whether they where trailing or not in another part of the config file. It does so annoy me with the lack of resilience/consistency between applications where you need to specify paths with/without trailing slashes.
Just a thought, but try adding 'C:\Program Files\TortoiseHg' to your system path. Maybe CCNet has it specified somewhere that Jenkins doesn't have access to.
Also, just for sanity's sake, verify that hg.exe actually exists at that location.

Erlang: calling rr(?MODULE) from beam executable?

I'm not entirely sure how to define an Erlang function within an Erlang module. I'm getting the following error:
11> invoke_record:invoke().
** exception error: undefined function erlang:rr/1
From this simple code trying to invoke the rr(?MODULE). from within the beam executable in order to "initialize" records so that it doesn't need to be called from the shell every time.
-module(invoke_record).
-export([invoke/0]).
-record(process, {pid,
reference="",
lifetime=0
}).
invoke() ->
erlang:rr(?MODULE).
The command rr("file.hrl"). is meant to be be used only in shell for debugging purposes.
As other users highlighted in their answers, the correct way to import a record (or a function) contained in a .hrl file within your erlang code consists in using the command -include("file.hrl').
Once you have included the .hrl file in your code (and usually in a module based on OTP behaviours this is done after the -export(...) part) you can refer to the Erlang record (or function) without any problem.
rr is a shell command. You cannot use it it compiled code.
http://www.erlang.org/doc/man/shell.html
If your intent is to read many record definitions in the shell, in order to facilitate the debug, you can write a file containing all needed include statements and simply invoke rr once in the shell.
in rec.hrl:
-include("include/bank.hrl").
-include("include/reply.hrl").
and in the in the shell
1> rr("rec.hrl").
[account,reply]
2>
I didn't find any way to execute this automatically, when starting the VM.
When working on a project, you can gather all necessary includes and other command line arguments that you want to use for that particular project in a plain text file. After having made the plain text file, you can start your shell:
erl -args_file FileName
where FileName is the name of the plain text file. Note that all command line arguments accepted by erl are allowed. See also erl Flags in the ERTS Reference Manual

Not able to make calls to mod_roster_odbc functions

I tried to use my own custom roster by integrating mod_roster_odbc. I changed the config file too (commented out mod_roster and make a new entry for mod_roster_odbc). After running with this setup, mod_roster_odbc module is getting started ( I put some logs to in start function, those I can see). But none of other function is not getting called as I alter presence or logged out/logged in.
Please help to identify where I am making the mistake.
I think I know the answer to this. many websites tell you to use mod_roster_odbc.erl to create your own rostering. I believe thats your problem. Many of the functions are merged into mod_roster.erl file itself. I dont think this is mentioned anywhere.
So what you need to do is in ejabberd.cfg enable mod_roster_odbc but dont remove the mod_roster.erl file with the odbc file. This file will take care.
Finally you need to create a rosterusers table (or something like it) so that ejabber can query for friend list. After these changes, just restart ejabber server and you should be good to go. hope this helps.

SQL Server Agent Adding a Parameter for a CmdExec

I want to add a parameter to a step that runs an operating system (CmdExec) in SQL Server Agent. I have searched everywhere and asked my coworkers and none of them had tried it before. I have attached a picture of the screen. I was thinking that I might be able to add the parameter (file path) after the .exe statement, but wasn't sure.
I thought the following might work:
Executable Path Parameter Path
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
This is on a production server and I didn't want to break anything if this isn't correct.
Thanks!
Yes You can use parameters, so your command would be:
C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt
If there is a space in the name don't forget to use quotes as specified in tip in screenshot:
"C:\My Program\MyApp.exe" "E:\App Info\Client\Config.txt"
Since You want to try it on production server, consider testing your configuration and software on test environment first. If You doubt that this will work, You can set job to execute only this single step to make sure it will work as expected.

SSIS package Error

i have updated the old SSIS Load package. i have changed the variable names and some other stuff but when i try to execute package it gives me error for old variable names that variable not found. now i checked it so many times, i have no old variable name defined anywhere then why its giving me error for previous variable names?
Thanks
Hard to diagnose your issue without any error messages or detail, but you could view the xml (think it's View menu, then Code), and search the XML text for any instances of the old variable that is throwing the error.
Best guess is that you are referencing the old variable name in an expression somewhere. If you are allowed in your environment, download BIDS Helper. It will highlight expressions for you to make them easier to find and correct.